lwp


LWP::UserAgent 6.04, POST and new behavior in \n as a part of the content


After an upgrade to LWP 6.04 from an older (5.8x?) version, i noticed that some code used in a distributed app that ran forever started breaking. I traced it to the change in handling of the \n in a POST.
On the client:
$post_data{'good'} = qq(This is a text line);
$post_data{'bad'} = qq(This is a first line\nThis is a second line);
my $ua = LWP::UserAgent->new();
my $response = $ua->post( $url, \%post_data );
return undef if (!defined $response);
On the server:
my $good = $q->param('good');
my $bad = $q->param('bad');
After the client runs server gets the following:
$good on the server side as expected ends up being qq(This is a text line).
$bad, however, ends up being qq(This is a first line\r\nThis is a second line).
Is there a way to avoid this "helpful" substitution without rewriting and redeploying the massive amount of code that utilized the previous behavior of LWP::UserAgent?
https://rt.cpan.org/Public/Bug/Display.html?id=75592

Related Links

LWP::UserAgent 6.04, POST and new behavior in \n as a part of the content

Categories

HOME
salesforce
postgresql-9.3
intellisense
squeak
perl6
servicenow
zabbix
activejdbc
element
android-notifications
box2d
cucumberjs
turn.js
quality-center
symlink
scripting-language
dynamic-memory-allocation
spring-oauth2
snapkit
voyager
cocoa-scripting
anypoint-studio
stdin
gem-fury
susy
vertical-alignment
irr
test-kitchen
inner-join
android-doze-and-standby
serverless-architecture
import.io
ionic2-select
wink
htop
directinput
foreground
tinybox2
hotkeys
php-java-bridge
django-taggit
supervised-learning
user-profile
innertext
videoview
overlapping
newlib
gnu-sort
bioconductor
maven-antrun-plugin
callfire
xml-simple
glog
copy-on-write
parseexception
nfa
growl
nsmutableurlrequest
reactjs-native
internet-radio
windows-phone-store
data-layers
nvcc
logo-lang
sygic
ie-developer-tools
octokit
pyxplot
coinbase-php
magicsuggest
setcookie
antixsslibrary
screensharing
m3u
netbiscuits
jquery-1.8
erlide
bash4
helicontech
pinchzoom
quazip
rpxnow
atmega16
asp.net-1.1

Resources

Encrypt Message