Skip Menu |
 

This queue is for tickets about the HTTP-Message CPAN distribution.

Report information
The Basics
Id: 51492
Status: resolved
Priority: 0/
Queue: HTTP-Message

People
Owner: Nobody in particular
Requestors: jschulz.cpan [...] bloonix.de
Cc: reed [...] reedloden.com
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Escape quotes and backslashes HTTP::Request::Common
Download (untitled) / with headers
text/plain 266b
Hi, on line 126 of HTTP::Request::Common: $k =~ s/([\\\"])/\\$1/g; # escape quotes and backslashes for some reasons I want to disable escaping of quotes. Is that possible? Maybe with a global variable like $HTTP::Request::Common::ESCAPEQUOTES=0; Cheers, Jonny
From: reed [...] reedloden.com
Download (untitled) / with headers
text/plain 837b
From my duplicate ticket #52312, here's a reason why people would want to not have backslashes escaped: I'm using LWP::UserAgent to send requests to a custom server-side service. LWP::UserAgent uses HTTP::Request internally, which uses HTTP::Request::Common to process requests. HTTP::Request::Common has a line of code that makes sending plain '\n' in requests just not possible: $k =~ s/([\\\"])/\\$1/g; # escape quotes and backslashes I want to be able to send "\n" in a form value, but I can't because of the above line. This means that even if I have a parameter "paths" with "/img/blah.png\n/img/blah2.png", HTTP::Request::Common happily converts the '\n' to '\\n', changing "paths" to be "/img/blah.png\\n/img/blah2.png". I think I should be able to send "\n" in a form value. I can write a small test script if it's needed...
Download (untitled) / with headers
text/plain 359b
Okay, then some words about my concern. My reason is that I send a post request to a HTTP-Server (ticket system). The data within the post request are used to generate a email. If the text contains quotation marks Foo bar "foo baz" foo bar. then the mail text contains backslashes Foo bar \"foo baz\" foo bar. for this reason I want to disable quoting.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.