Skip to content

Commit 0a80dfa

Browse files
Change headers (exercism#37)
* Remove content-length header * Change content-type to text/plain
1 parent a14f8e2 commit 0a80dfa

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

Diff for: lib/snippet_extractor/process_request.rb

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ def call
1010
{
1111
statusCode: 200,
1212
statusDescription: "200 OK",
13-
headers: {
14-
'Content-Length': snippet.bytesize,
15-
'Content-Type': 'application/plain; charset=utf-8'
16-
},
13+
headers: { 'Content-Type': 'text/plain' },
1714
isBase64Encoded: false,
1815
body: snippet
1916
}

Diff for: test/process_request_test.rb

+1-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ def test_e2e
2323
expected = {
2424
statusCode: 200,
2525
statusDescription: "200 OK",
26-
headers: {
27-
'Content-Length': 9,
28-
'Content-Type': 'application/plain; charset=utf-8'
29-
},
26+
headers: { 'Content-Type': 'text/plain' },
3027
isBase64Encoded: false,
3128
body: snippet.rstrip
3229
}

0 commit comments

Comments
 (0)