WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
44444
Set the ResourceResponse HTTP headers in RessourceHandleWin
https://bugs.webkit.org/show_bug.cgi?id=44444
Summary
Set the ResourceResponse HTTP headers in RessourceHandleWin
Patrick R. Gansterer
Reported
2010-08-23 11:39:44 PDT
see patch
Attachments
Patch
(4.38 KB, patch)
2010-08-23 11:46 PDT
,
Patrick R. Gansterer
aroben
: review-
Details
Formatted Diff
Diff
Patch
(3.34 KB, patch)
2010-08-23 12:21 PDT
,
Patrick R. Gansterer
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Patrick R. Gansterer
Comment 1
2010-08-23 11:46:10 PDT
Created
attachment 65144
[details]
Patch
Adam Roben (:aroben)
Comment 2
2010-08-23 11:54:18 PDT
Comment on
attachment 65144
[details]
Patch
> - client()->didReceiveData(this, buffer, buffers.dwBufferLength, 0); > + > + if (ResourceHandleClient* resourceHandleClient = client()) > + resourceHandleClient->didReceiveData(this, buffer, buffers.dwBufferLength, 0); > buffers.dwBufferLength = bufferSize; > } > > @@ -272,8 +293,24 @@ void ResourceHandle::onRequestComplete(L > InternetCloseHandle(d->m_secondaryHandle); > InternetCloseHandle(d->m_resourceHandle); > > - client()->didFinishLoading(this); > - delete this; > + if (ResourceHandleClient* resourceHandleClient = client()) > + resourceHandleClient->didFinishLoading(this); > + > + deref(); // balances ref in start > +}
These changes seem completely separate from what the bug claims to be fixing. I think you should split them into a separate bug/patch.
> +String ResourceHandle::queryHTTPHeader(DWORD infoLevel) > +{ > + DWORD bufferSize = 0; > + HttpQueryInfoW(d->m_requestHandle, infoLevel, 0, &bufferSize, 0); > + > + UChar* characters; > + String result = String::createUninitialized(bufferSize / sizeof(UChar), characters); > + > + if (HttpQueryInfoW(d->m_requestHandle, infoLevel, characters, &bufferSize, 0)) > + return result.left(result.length() - 1); // Remove NullTermination.
I think using a Vector<UChar> and String::adopt would be more efficient, since you won't have to copy the whole string at the end. It would be clearer to have an early return if the second call to HttpQueryInfoW fails. It might be nicer for this function to be a non-member function with internal linkage.
Patrick R. Gansterer
Comment 3
2010-08-23 12:21:25 PDT
Created
attachment 65150
[details]
Patch
Adam Roben (:aroben)
Comment 4
2010-08-23 12:31:30 PDT
Comment on
attachment 65150
[details]
Patch r=me
WebKit Commit Bot
Comment 5
2010-08-23 20:26:33 PDT
Comment on
attachment 65150
[details]
Patch Clearing flags on attachment: 65150 Committed
r65859
: <
http://trac.webkit.org/changeset/65859
>
WebKit Commit Bot
Comment 6
2010-08-23 20:26:38 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug