
dakkar at thenautilus
Apr 13, 2012, 2:01 AM
Post #3 of 4
(235 views)
Permalink
|
On 2012-04-13 Сергей Дмитриев <s_dmitriev [at] inbox> wrote: > Recently we've developed small web application which, for some cases, > receives data in base64 format, as value of one fields of POST > request. > I've noticed that probably there's something wrong with decoding of > such data. E.g. + will become spaces (it's ok) but %3D still intact. That does not look very much like base64… it looks much more like the URI encoding. (example: the string "a simple example" would encode to "YSBzaW1wbGUgZXhhbXBsZQ==" in base64, but to "a+simple+example" or "a%20simple%20example" in a URI) Incidentally, most browsers will send data URI-encoded for forms, not base64-encoded. So I suspect that you data is not really base64. If I'm correct, than Catalyst should decode the data for you automatically. How are you accessing the request data? Have you tried just dumping (via Data::Dumper, or Data::Printer) the value of $c->request->body_parameters ? -- Dakkar - <Mobilis in mobile> GPG public key fingerprint = A071 E618 DD2C 5901 9574 6FE2 40EA 9883 7519 3F88 key id = 0x75193F88 The old complaint that mass culture is designed for eleven-year-olds is of course a shameful canard. The key age has traditionally been more like fourteen. -- Robert Christgau, "Esquire"
|