Skip to content

Apply pipes to python handlers - #8541

Merged
jgraham merged 2 commits into
web-platform-tests:masterfrom
gterzian:apply_pipes_to_python_handlers
Jan 11, 2018
Merged

jgraham merged 2 commits into
web-platform-tests:masterfrom
gterzian:apply_pipes_to_python_handlers

Conversation

@gterzian

@gterzian gterzian commented Dec 2, 2017 •

Copy link
Copy Markdown
Contributor

Follow-up on #8415 (comment)

I only added support for applying pipes to Python script and function handlers(which covers the json handler as well), for the following reason:

  1. That was the use case I encountered myself("apply standard pipes on top of the custom logic contained in the python handler, to avoid writing custom code")
  2. I'm currently wondering if there is any value in applying pipes to other handlers like directory and as_is.

This change is Reviewable

@gterzian
gterzian force-pushed the apply_pipes_to_python_handlers branch 2 times, most recently from f4f5d77 to 47fd7d9 Compare December 2, 2017 04:16
@ghost

ghost commented Dec 2, 2017 •

Copy link
Copy Markdown

Build PASSED

Started: 2017-12-06 07:09:09
Finished: 2017-12-06 07:21:11

View more information about this build on:

@gterzian
gterzian force-pushed the apply_pipes_to_python_handlers branch 2 times, most recently from 32d0e05 to 18ea7f1 Compare December 2, 2017 10:55
@gterzian
gterzian force-pushed the apply_pipes_to_python_handlers branch from 18ea7f1 to b937f47 Compare December 2, 2017 11:21
@gsnedders

Copy link
Copy Markdown
Member

@gterzian trickle for example would still be useful on asis at least; I think for simplicity's sake we should just support it everywhere unless there's any real cost associated with doing so

@jgraham

jgraham commented Dec 4, 2017

Copy link
Copy Markdown
Contributor

One thing that Python handlers can do that isn't necessarily compatible with pipes is interact with the socket directly. I'm not actually sure if this can cause any issues. Maybe not, but perhaps we should have a test for it. Otherwise I'm happy to take this change, or to add support for asis.

@gterzian
gterzian force-pushed the apply_pipes_to_python_handlers branch 2 times, most recently from c075fcf to 3ea3097 Compare December 6, 2017 05:15
@gterzian

gterzian commented Dec 6, 2017 •

Copy link
Copy Markdown
Contributor Author

I've experimented with applying the pipes to the 'as_is' handler, and looked at what happens when stuff is written to the socket directly, see the extra commit(to be removed or squashed).

Actually the two points are related, since the as-is handler writes directly to the ResponseWriter.

When using that handler, or writing directly to the socket from within a script, it seems that all pipes are disregarded, except "trickle".

@gterzian
gterzian force-pushed the apply_pipes_to_python_handlers branch 7 times, most recently from a8a6a91 to 68465d5 Compare December 6, 2017 07:08
@gterzian
gterzian force-pushed the apply_pipes_to_python_handlers branch from 68465d5 to 1f31060 Compare December 6, 2017 07:19
@jgraham
jgraham merged commit 8f45026 into web-platform-tests:master Jan 11, 2018
@gterzian
gterzian deleted the apply_pipes_to_python_handlers branch January 12, 2018 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants