diff options
author | franck cuny <franck@lumberjaph.net> | 2010-11-24 11:19:02 +0100 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-11-24 11:19:15 +0100 |
commit | 31cfcef712e7e3f23228c7a81db838af8ecc77d2 (patch) | |
tree | 8374f7931fa6c71cce4c4dff0d8138a636f1efae | |
parent | add new tests to check content-type value (diff) | |
download | net-http-spore-31cfcef712e7e3f23228c7a81db838af8ecc77d2.tar.gz |
fix an issue where content-type was not set correctly
-rw-r--r-- | lib/Net/HTTP/Spore/Request.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Net/HTTP/Spore/Request.pm b/lib/Net/HTTP/Spore/Request.pm index f74af11..365e736 100644 --- a/lib/Net/HTTP/Spore/Request.pm +++ b/lib/Net/HTTP/Spore/Request.pm @@ -318,7 +318,8 @@ sub finalize { if ( my $payload = $self->content ) { $request->content($payload); $request->header( - 'Content-Type' => 'application/x-www-form-urlencoded' ); + 'Content-Type' => 'application/x-www-form-urlencoded' ) + unless $request->header('Content-Type'); } return $request; |