Changeset 151668 in webkit
- Timestamp:
- Jun 17, 2013 11:09:40 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r151665 r151668 1 2013-06-17 Peter Gal <galpeter@inf.u-szeged.hu> 2 3 [curl] Set the http response status text 4 https://bugs.webkit.org/show_bug.cgi?id=117307 5 6 Reviewed by Brent Fulgham. 7 8 No new tests, covered by existing ones. 9 10 * platform/network/curl/ResourceHandleManager.cpp: 11 (WebCore::headerCallback): 12 1 13 2013-06-14 Brent Fulgham <bfulgham@apple.com> 2 14 -
trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp
r151580 r151668 367 367 else 368 368 d->m_response.setHTTPHeaderField(key, value); 369 } else if (header.startsWith("HTTP", false)) { 370 // This is the first line of the response. 371 // Extract the http status text from this. 372 // 373 // If the FOLLOWLOCATION option is enabled for the curl handle then 374 // curl will follow the redirections internally. Thus this header callback 375 // will be called more than one time with the line starting "HTTP" for one job. 376 long httpCode = 0; 377 curl_easy_getinfo(d->m_handle, CURLINFO_RESPONSE_CODE, &httpCode); 378 379 String httpCodeString = String::number(httpCode); 380 int statusCodePos = header.find(httpCodeString); 381 382 if (statusCodePos != -1) { 383 // The status text is after the status code. 384 String status = header.substring(statusCodePos + httpCodeString.length()); 385 d->m_response.setHTTPStatusText(status.stripWhiteSpace()); 386 } 387 369 388 } 370 389 }
Note: See TracChangeset
for help on using the changeset viewer.