Permalink
Browse files

provide Content-type

  • Loading branch information...
1 parent efcc40c commit b83e031ab198bf3967a1a9d30e24d10a08d53694 @dakkar committed Mar 1, 2012
Showing with 4 additions and 0 deletions.
  1. +1 −0 lib/Plack/Handler/Stomp.pm
  2. +3 −0 t/building_request.t
@@ -708,6 +708,7 @@ sub build_psgi_env {
# http
HTTP_USER_AGENT => 'Net::Stomp',
HTTP_CONTENT_LENGTH => length($frame->body),
+ HTTP_CONTENT_TYPE => $frame->headers->{'content-type'},
# psgi
'psgi.version' => [1,0],
@@ -18,6 +18,7 @@ test 'a simple request' => sub {
headers => {
destination => '/queue/testing',
'message-id' => 123,
+ 'content-type' => 'json',
},
body => 'foo',
}));
@@ -43,6 +44,7 @@ test 'a simple request' => sub {
# http
HTTP_USER_AGENT => 'Net::Stomp',
HTTP_CONTENT_LENGTH => 3,
+ HTTP_CONTENT_TYPE => 'json',
# psgi
'psgi.version' => [1,0],
@@ -56,6 +58,7 @@ test 'a simple request' => sub {
# stomp
'jms.destination' => '/queue/testing',
'jms.message-id' => 123,
+ 'jms.content-type' => 'json',
# application
'testapp.body' => 'foo',

0 comments on commit b83e031

Please sign in to comment.