summary refs log tree commit diff
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-11-24 11:19:02 +0100
committerfranck cuny <franck@lumberjaph.net>2010-11-24 11:19:15 +0100
commit31cfcef712e7e3f23228c7a81db838af8ecc77d2 (patch)
tree8374f7931fa6c71cce4c4dff0d8138a636f1efae
parentadd new tests to check content-type value (diff)
downloadnet-http-spore-31cfcef712e7e3f23228c7a81db838af8ecc77d2.tar.gz
fix an issue where content-type was not set correctly
-rw-r--r--lib/Net/HTTP/Spore/Request.pm3
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;