Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

ISO-8859-1 encoded parameters in application/x-www-form-urlencoded requests

$
0
0
Hello:

I'm using CXF 2.7.8 to deploy a webservice and to process
application/x-www-form-urlencoded content-type POST requests

My webservice is receiving this request

Encoding: ISO-8859-1
Http-Method: POST
Content-Type: application/x-www-form-urlencoded
Headers: {content-type=[application/x-www-form-urlencoded],
host=[x.x,x,x], user-agent=[Java/1.7.0_25]}
Payload:agentId=5490424&name=Jos%E1+Maria

%E1 corresponds to tittle-e character ( Spanish é ) ISO-8859-1 encoded
But my CXF service waits UTF-8 encoded characters , so it doesn't
decode it correctly

But if I send
Content-Type: "application/x-www-form-urlencoded; charset=ISO-8859-1"

all works fine

is this the correct/standard compliant behaviour ?

As a workaround , can I modify my service to decode ISO-8859-1
characters without forcing to my clients to send charset=ISO-8859-1
header ?

Thanks and regards

Viewing all articles
Browse latest Browse all 5648

Trending Articles