-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
if there is no entity parse empty line anyway
- Loading branch information
Showing
3 changed files
with
10 additions
and
9 deletions.
There are no files selected for viewing
13 changes: 7 additions & 6 deletions
13
src/PaaS.package/PaaSBackend.class/instance/handlePostRequest..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
request handling | ||
handlePostRequest: request | ||
| piller badRequest | | ||
badRequest := [ ^ ZnResponse badRequest: request ]. | ||
(request hasEntity and: [ request contentType matches: ZnMimeType text ]) | ||
ifFalse: badRequest. | ||
piller := request entity string ifNil: ''. | ||
^ ZnResponse ok: (ZnEntity text: (self return: (PRPillarParser parse: piller))) | ||
| pillar | | ||
(request contentType matches: ZnMimeType text) | ||
ifFalse: [ ^ ZnResponse badRequest: request ]. | ||
pillar := request hasEntity | ||
ifTrue: [ request entity string ifNil: [ '' ] ] | ||
ifFalse: [ '' ]. | ||
^ ZnResponse ok: (ZnEntity text: (self return: (PRPillarParser parse: pillar))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
(name 'PaaS-AliakseiSyrel.3' message 'if string is nil, parse empty one' id '2ad4e45a-742b-4820-9769-fb4d22019614' date '3 September 2016' time '11:13:35.411731 am' author 'AliakseiSyrel' ancestors ((name 'PaaS-AliakseiSyrel.2' message 'Implemented post response | ||
' id '1772ae7a-b1f5-5a28-94bb-cc3945caad3a' date '3 September 2016' time '11:00:09 am' author 'AliakseiSyrel' ancestors () stepChildren ())) stepChildren ()) | ||
(name 'PaaS-AliakseiSyrel.4' message 'if there is no entity parse empty line anyway' id '790843ac-faa7-48e6-9746-e0c947864bcf' date '3 September 2016' time '11:22:02.234354 am' author 'AliakseiSyrel' ancestors ((name 'PaaS-AliakseiSyrel.3' message 'if string is nil, parse empty one | ||
' id '78c44f14-fc7a-5591-8ca4-9c53cab7eecf' date '3 September 2016' time '11:14:12 am' author 'AliakseiSyrel' ancestors () stepChildren ())) stepChildren ()) |