Skip to content

Commit

Permalink
provide Content-type
Browse files Browse the repository at this point in the history
  • Loading branch information
dakkar committed Mar 1, 2012
1 parent efcc40c commit b83e031
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/Plack/Handler/Stomp.pm
Expand Up @@ -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],
Expand Down
3 changes: 3 additions & 0 deletions t/building_request.t
Expand Up @@ -18,6 +18,7 @@ test 'a simple request' => sub {
headers => {
destination => '/queue/testing',
'message-id' => 123,
'content-type' => 'json',
},
body => 'foo',
}));
Expand All @@ -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],
Expand All @@ -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',
Expand Down

0 comments on commit b83e031

Please sign in to comment.