W3C home > Mailing lists > Public > public-qa-dev@w3.org > August 2008

Re: first questions on validator.nu

From: Henri Sivonen <hsivonen@iki.fi>
Date: Fri, 1 Aug 2008 16:33:56 +0300
Cc: olivier Thereaux <ot@w3.org>, public-qa-dev@w3.org
Message-Id: <BC0F68E7-6B7E-42C9-B278-C54F50FA7F5F@iki.fi>
To: Yves Lafon <ylafon@w3.org>

On Aug 1, 2008, at 15:58, Yves Lafon wrote:
> On Fri, 1 Aug 2008, Henri Sivonen wrote:
>> Indeed, Jigsaw is missing the setCharacterEncoding() method on  
>> HttpServletRequest objects. I made the servlet catch  
>> java.lang.NoSuchMethodError there, so if the servlet is compiled  
>> under a more current servlet API, it runs without crashing (but  
>> without non-ASCII query string support) under a vintage servlet  
>> API. (Jigsaw also lacks getRequestURL(), but having that method  
>> wasn't critical, so I removed the call.)
> Ok, I will add those methods, just need to find at which level of  
> the servlet spec it belongs.

It seems that both methods are implemented, but the bundled  
servlet.jar doesn't match.

>> The other thing in the servlet that I needed to modify was treating  
>> a null return value from getPathInfo() as if the return value had  
>> been "/". (With longer paths, Jigsaw seems to swallow the trailing  
>> slash.)
> Hum, that look like a bug, I'll fix that.


>> There's an additional problem that is significant considering use  
>> as a Unicorn back end: When the method is POST, Jigsaw does not  
>> provide request URI query string parameters via the getParameter()  
>> method on HttpServletRequest. This means that the output format  
>> cannot be selected. (In Jetty, getParameter() returns request URI  
>> parameters when POSTing a non-form entity body.)
> IIRC, Jigsaw adds the two sets of parameters (from the decoded POST  
> if it applies + the URI ones), but it may be an issue if the content  
> is an uploaded file, for example.

If method is POST, Jigsaw goes into a branch that checks if the  
Content-Type is application/x-www-form-urlencoded and returns early if  
not. Instead of returning early, the GET case would have to run to  
achieve compatibility with Jetty.

Henri Sivonen
Received on Friday, 1 August 2008 13:34:42 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:36:27 UTC