[Webkit-unassigned] [Bug 20795] text/plain form encoding ignored and incorrectly specified in request header
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Oct 26 10:28:15 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=20795
Darin Adler <darin at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #112559|review? |review-
Flag| |
--- Comment #16 from Darin Adler <darin at apple.com> 2011-10-26 10:28:15 PST ---
(From update of attachment 112559)
View in context: https://bugs.webkit.org/attachment.cgi?id=112559&action=review
Is this correct behavior? Do other browsers do this? What websites use this feature?
> Source/WebCore/platform/network/FormData.cpp:102
> +PassRefPtr<FormData> FormData::create(const FormDataList& list, const TextEncoding& encoding, const EncodingType encodingType)
This should just be EncodingType, not const EncodingType.
> Source/WebCore/platform/network/FormData.cpp:183
> +void FormData::appendKeyValuePairItems(const FormDataList& list, const TextEncoding& encoding, bool isMultiPartForm, Document* document, const EncodingType encodingType)
No const here either.
> Source/WebCore/platform/network/FormData.h:104
> + static PassRefPtr<FormData> create(const FormDataList&, const TextEncoding&, const EncodingType encodingType = FormURLEncoded);
This should be:
EncodingType = FormURLEncoded
The const is not needed or helpful, and the argument name is not helpful.
> Source/WebCore/platform/network/FormData.h:138
> + static EncodingType getEncodingType(const String& type)
Functions like this are not named with the word “get” in WebKit. This is covered in the coding style guide.
This should probably be named “parseEncodingType”.
> Source/WebCore/platform/network/FormData.h:143
> + return MultipartFormData;
Extra space here.
> Source/WebCore/platform/network/FormData.h:151
> + void appendKeyValuePairItems(const FormDataList&, const TextEncoding&, bool isMultiPartForm, Document*, const EncodingType encodingType = FormURLEncoded);
Same comment as above.
> Source/WebCore/platform/network/FormDataBuilder.cpp:184
> +void FormDataBuilder::addKeyValuePairAsFormData(Vector<char>& buffer, const CString& key, const CString& value, const FormData::EncodingType encodingType)
Same comment as above.
> Source/WebCore/platform/network/FormDataBuilder.h:47
> + static void addKeyValuePairAsFormData(Vector<char>&, const CString& key, const CString& value, FormData::EncodingType encodingType = FormData::FormURLEncoded);
Should omit the argument name here.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list