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
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -708,6 +708,7 @@ sub build_psgi_env {
# http # http
HTTP_USER_AGENT => 'Net::Stomp', HTTP_USER_AGENT => 'Net::Stomp',
HTTP_CONTENT_LENGTH => length($frame->body), HTTP_CONTENT_LENGTH => length($frame->body),
HTTP_CONTENT_TYPE => $frame->headers->{'content-type'},


# psgi # psgi
'psgi.version' => [1,0], 'psgi.version' => [1,0],
Expand Down
3 changes: 3 additions & 0 deletions t/building_request.t
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ test 'a simple request' => sub {
headers => { headers => {
destination => '/queue/testing', destination => '/queue/testing',
'message-id' => 123, 'message-id' => 123,
'content-type' => 'json',
}, },
body => 'foo', body => 'foo',
})); }));
Expand All @@ -43,6 +44,7 @@ test 'a simple request' => sub {
# http # http
HTTP_USER_AGENT => 'Net::Stomp', HTTP_USER_AGENT => 'Net::Stomp',
HTTP_CONTENT_LENGTH => 3, HTTP_CONTENT_LENGTH => 3,
HTTP_CONTENT_TYPE => 'json',


# psgi # psgi
'psgi.version' => [1,0], 'psgi.version' => [1,0],
Expand All @@ -56,6 +58,7 @@ test 'a simple request' => sub {
# stomp # stomp
'jms.destination' => '/queue/testing', 'jms.destination' => '/queue/testing',
'jms.message-id' => 123, 'jms.message-id' => 123,
'jms.content-type' => 'json',


# application # application
'testapp.body' => 'foo', 'testapp.body' => 'foo',
Expand Down

0 comments on commit b83e031

Please sign in to comment.