tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aryeh M. Friedman" <aryeh.fried...@gmail.com>
Subject Re: unified doXXX()
Date Tue, 02 Mar 2010 21:05:43 GMT
Aryeh M. Friedman wrote:
> Christopher Schultz wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Aryeh,
>>
>> On 3/2/2010 3:48 PM, Aryeh M. Friedman wrote:
>>  
>>> Christopher Schultz wrote:
>>>
>>>    
>>>> Is this a new client, or just a new data format? Mark's suggestion 
>>>> that
>>>> you may be using POST without the proper Content-Type would result in
>>>> getting null for this parameter (because Tomcat will not parse it for
>>>> you). If this is the case, you should either fix the new client to use
>>>> the proper Content-Type, or fall-back to reading and parsing the 
>>>> request
>>>> body manually when these requirements are not met.
>>>>         
>>> New format same frontend client code which does use the proper content
>>> type. (the content type is defined at a lower level then the format and
>>> that code has not changed [using firebug on firefox confirms that 
>>> fact])
>>>     
>>
>> Hmm.
>>
>> So, POST + application/x-www-form-urlencoded yields a null parameter
>> with your new payload?
>>
>> I know this sounds silly, but we're getting down to the
>> grasping-at-straws level, here, so bear with me: have you checked to see
>> that your request body is actually in the correct format (that is,
>> urlencoded, etc.)? I haven't looked at the Tomcat code, but Tomcat might
>> give up if the request body is not parsable.
>>
>> Have you tried calling request.getInputStream and dumping the request
>> body when the parameter is null? That might give you some indication of
>> what's happening.
>>   
> The client does url encode in addition to translating any chars that 
> are used either by tomcat and/or or app to decode the reaquest (namely 
> = is translated to ^, comma to #, right/left parens to @ and $ 
> respectivally) then I use javascripts "escape(string)" method to url 
> encode it.... the app by default uses post but if I cut and paste the 
> resulting payload into a GET and pass it to the app it works fine 
> (i.e. the app uses POST but I do manual testing with GET)
>
opps forgot to mention the manual test works for both the new and old 
format but the automated method only works for the old format (both 
formats use the one param to rule them all strategy)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message