|
I understand that custom crafted requests, such as those generated using
HttpClient, may encounter this type of issue. However, I have seen no evidence that the most commonly used clients (i.e. the most popular browsers) pay any attention to the 'charset' parameter. Therefore I maintain that this should be considered as an issue to be considered after a FileUpload 1.0 release. Martin,
I understand your position. But before this issue is put on back burner, allow Anyways, I have the patch almost ready. The patch will retain complete API Once release 1.0 is branched out I would be prepared to contribute additional Cheers Oleg Created an attachment (id=6914)
Patch (take 1) Oleg, I understand your position too, but please realise that FileUpload is at
the Release Candidate stage now. I took a look at the patch you attached, and that is WAY too much change to be introducing into a Release Candidate. What I would like to do is to release FileUpload 1.0 Final as is, very soon, Getting a FileUpload 1.0 Final release out the door very soon is really, really Fair enough. Good luck with the release. Cheers.
Oleg Created an attachment (id=7593)
Patch (take 2) The parameter parser has been optimized to eliminate unnecessary object
instantiation. Parsing should be a bit faster now. Oleg I believe the default charset to be used is ISO-8859-1 (compatible with
US-ASCII) if none is given. From RFC2046, MIME Part Two: Media Types: – RFC2046: Quote ------------ 4.1.2. Charset Parameter A critical parameter that may be specified in the Content-Type field Content-type: text/plain; charset=iso-8859-1 Unlike some other parameter values, the values of the charset – RFC2046: End of quote ----- From RFC2616, HTTP/1.1: – RFC2616: Quote ------------ The "charset" parameter is used with some media types to define the – RFC2616: End of quote ----- One may argue that RFC2046 should take precedence in this particular case, but I
agree that ISO-8859-1 is most likely to be expected by the users as a default HTTP content encoding Anyways, the patch is wrong in using default system encoding when no charset Oleg Oleg: While it's probably not required just for the charset parameter of the
content-type header, you might want to add support to your ParameterParser for escaped characters inside the quoted parameter-value: Header: header-value; parameter="value with \"quotes\" inside" The javadoc for "ParameterParser.parseQuotedToken(final char[] terminators)" The syntax of the content-type header in RFC2045 (section 5.1) is based on – RFC822: Quote ------------ qtext = <any CHAR excepting <">, ; => may be folded – RFC822: End of quote ----- Fair enough. I'll do so.
Oleg Created an attachment (id=8205)
Patch (take 3) The new patch should
Let me know what you think Cheers Oleg Hi
We did a local integration of the patch provided by Oleg we wanted to allow iso latin characters to be allowed in a form mixing text Then please consider incorporating it really soon in any upcoming release !! Is there any progress being made on this?
It appears none of the present maintainers has got any bandwidth left for
[FileUpload]. I believe I have access permissions to check the patch in myself; however, I am reluctant to do it without having an explicit OK from someone overseeing the development of [FileUpload]. Oleg Check-in would already make our life easier (avoids to patch the code ourselves,
as we needed to), then please go. The next real question is when and how can a new release of this package be delivered ? Several comments on this:
By the way, I am finding it *really annoying* that comments from Christoffer Martin:
I am looking forward to the next version! Martin:
It seems that bugzilla has switched to using UTF-8 since i first registered my Hi
I confirm that we had the issue (accented characters are not preserved in forms mixing data input and file uploads) with data in the iso-latin charset and using any recent web browser like MSIE 6, Mozilla 1.4, Konqueror, etc..., on either MS Win XP, Linux 2.4, Win 2000 Then please revise your evaluation of the priority for this issue (some server details : Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed > * I am not willing to commit a patch for this issue without an accompanying
> unit test. The issue, as I understand it, does not arise with current browsers, > so without a unit test, I would be "driving blind". Martin, > * The fact that you are at "take 3" on a patch for this emphasises the need for This is a very interesting observation. Actually the patch has been ignored for If you see some flaws in implementation, feel free to point them out, and I'll Moreover, if you find attempts to make [FileUpload] a little friendlier to Kind regards, Oleg OK, I've looked at "take 3", and if you're willing to make a few changes, I'll
commit a "take 4". 1) The new classes need to have the 2.0 license applied, since the rest of 2) All of the code needs to abide by the Turbine coding guidelines. (Checkstyle 3) The Javadocs for all methods need to include documentation for the Martin,
I'll do so. Just give me a couple of days. Oleg Created an attachment (id=10725)
Patch (take 4) I did my best to address your concerns. Let me know if there's anything else
left to be done. One last thing from my side: I believe it would make sense extending FileItem Regards, Oleg Fixed in the 20040312 nightly build.
I've applied "take 4", with a few minor changes to make Checkstyle a little see also see also Bug 34291 for the case where the browsers still do not declare the
charset, but you know it is not being the hard-coded ISO-8859-1 for the case where the browsers still do not declare the charset, but you know it is not being the hard-coded ISO-8859-1 see related bug in firefox https://bugzilla.mozilla.org/show_bug.cgi?id=289060
and RFE see related bug in firefox https://bugzilla.mozilla.org/show_bug.cgi?id=289060 and RFE Bug 34297 (to gracefully handle the transition in struts until all browsers do use the charset) (to gracefully handle the transition in struts until all browsers do use the charset) a patch that makes struts benefit from this endeavour a patch that makes struts benefit from this endeavour Bug 34445
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
feature request. If you like I could come up with a patch to address this issue.
In HttpClient project we confront similar problems quite often and have a lot of
code I can draw upon. Just let me know.
Oleg