30 hours agoFaster response body verification in XHR text receive benchmark master
hiroshige@chromium.org [Wed, 27 Aug 2014 08:53:34 +0000 (08:53 +0000)]
Faster response body verification in XHR text receive benchmark

This fixes the performance bottleneck of XHR text receive benchmarking.


Review URL: https://codereview.appspot.com/130660043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@826 4ff78f4a-9131-11de-b045-6380ec9940d4

30 hours agoFaster request body verification in XHR send handler
hiroshige@chromium.org [Wed, 27 Aug 2014 08:16:14 +0000 (08:16 +0000)]
Faster request body verification in XHR send handler

This fixes the performance bottleneck of XHR send benchmarking.


Review URL: https://codereview.appspot.com/131350043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@825 4ff78f4a-9131-11de-b045-6380ec9940d4

3 weeks agoFix indentation in benchmark.html
tyoshino@chromium.org [Tue, 5 Aug 2014 05:32:54 +0000 (05:32 +0000)]
Fix indentation in benchmark.html


Review URL: https://codereview.appspot.com/116570043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@822 4ff78f4a-9131-11de-b045-6380ec9940d4

3 weeks ago[Benchmark tools] Adjust start/stop size
tyoshino@chromium.org [Mon, 4 Aug 2014 09:25:50 +0000 (09:25 +0000)]
[Benchmark tools] Adjust start/stop size

R=yhirano@chromium.org, yhirano

Review URL: https://codereview.appspot.com/105450043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@821 4ff78f4a-9131-11de-b045-6380ec9940d4

2 months ago[benchmark.html] Recreate data also when size decreases
tyoshino@chromium.org [Wed, 25 Jun 2014 06:24:37 +0000 (06:24 +0000)]
[benchmark.html] Recreate data also when size decreases


Review URL: https://codereview.appspot.com/101520044

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@817 4ff78f4a-9131-11de-b045-6380ec9940d4

2 months ago[benchmark.html] Use bind to build test runner closures.
tyoshino@chromium.org [Wed, 25 Jun 2014 06:24:25 +0000 (06:24 +0000)]
[benchmark.html] Use bind to build test runner closures.


Review URL: https://codereview.appspot.com/106180044

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@816 4ff78f4a-9131-11de-b045-6380ec9940d4

2 months ago[benchmark.html] Add a switch to turn on/off data verification
tyoshino@chromium.org [Wed, 25 Jun 2014 04:26:43 +0000 (04:26 +0000)]
[benchmark.html] Add a switch to turn on/off data verification


Review URL: https://codereview.appspot.com/105100045

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@815 4ff78f4a-9131-11de-b045-6380ec9940d4

2 months agoMove PerMessageCompressTest.test_receive_message_deflate_mixed_btype to PerMessageDef...
tyoshino@chromium.org [Thu, 12 Jun 2014 06:25:58 +0000 (06:25 +0000)]
Move PerMessageCompressTest.test_receive_message_deflate_mixed_btype to PerMessageDeflateTest


Review URL: https://codereview.appspot.com/104050044

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@814 4ff78f4a-9131-11de-b045-6380ec9940d4

2 months ago[benchmark.html] Add a checkbox to turn on/off size column printing
tyoshino@chromium.org [Wed, 11 Jun 2014 09:19:43 +0000 (09:19 +0000)]
[benchmark.html] Add a checkbox to turn on/off size column printing


Review URL: https://codereview.appspot.com/107870043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@812 4ff78f4a-9131-11de-b045-6380ec9940d4

2 months agoMove PerMessageCompressTest.test_receive_message_deflate to PerMessageDeflateTest
tyoshino@chromium.org [Wed, 11 Jun 2014 09:18:56 +0000 (09:18 +0000)]
Move PerMessageCompressTest.test_receive_message_deflate to PerMessageDeflateTest


Review URL: https://codereview.appspot.com/101170043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@811 4ff78f4a-9131-11de-b045-6380ec9940d4

2 months agoMove PerMessageCompressTest.test_receive_message_deflate_random_section to PerMessage...
tyoshino@chromium.org [Wed, 11 Jun 2014 08:26:18 +0000 (08:26 +0000)]
Move PerMessageCompressTest.test_receive_message_deflate_random_section to PerMessageDeflateTest


Review URL: https://codereview.appspot.com/109800044

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@810 4ff78f4a-9131-11de-b045-6380ec9940d4

2 months agoMove PerMessageCompressTest.test_send_message_deflate_fragmented_bfinal to PerMessage...
tyoshino@chromium.org [Wed, 11 Jun 2014 04:40:52 +0000 (04:40 +0000)]
Move PerMessageCompressTest.test_send_message_deflate_fragmented_bfinal to PerMessageDeflateTest


Review URL: https://codereview.appspot.com/104020043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@809 4ff78f4a-9131-11de-b045-6380ec9940d4

2 months agoMove PerMessageCompressTest.test_send_message_deflate() to PerMessageDeflateTest
tyoshino@chromium.org [Tue, 10 Jun 2014 06:40:35 +0000 (06:40 +0000)]
Move PerMessageCompressTest.test_send_message_deflate() to PerMessageDeflateTest


Review URL: https://codereview.appspot.com/108770043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@808 4ff78f4a-9131-11de-b045-6380ec9940d4

2 months agoAdd text mode to xhr_benchmark.html
tyoshino@chromium.org [Mon, 9 Jun 2014 02:19:57 +0000 (02:19 +0000)]
Add text mode to xhr_benchmark.html

R=yhirano@chromium.org, yhirano

Review URL: https://codereview.appspot.com/103170043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@807 4ff78f4a-9131-11de-b045-6380ec9940d4

2 months ago[benchmark.html] Print time per message
tyoshino@chromium.org [Mon, 9 Jun 2014 01:55:00 +0000 (01:55 +0000)]
[benchmark.html] Print time per message


Review URL: https://codereview.appspot.com/103110048

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@806 4ff78f4a-9131-11de-b045-6380ec9940d4

2 months agoRemove alert() call introduced to benchmark.html by mistake
tyoshino@chromium.org [Fri, 6 Jun 2014 06:02:58 +0000 (06:02 +0000)]
Remove alert() call introduced to benchmark.html by mistake


Review URL: https://codereview.appspot.com/103910046

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@805 4ff78f4a-9131-11de-b045-6380ec9940d4

3 months agoRemove perframe-compress extension support
tyoshino@chromium.org [Mon, 26 May 2014 13:44:00 +0000 (13:44 +0000)]
Remove perframe-compress extension support

Tests are kept and will be run against deflate-frame


Review URL: https://codereview.appspot.com/100690043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@804 4ff78f4a-9131-11de-b045-6380ec9940d4

3 months ago[Test only] Move deflate tests from PerMessageCompressTest to PerMessageDeflateTest
tyoshino@chromium.org [Mon, 26 May 2014 09:27:38 +0000 (09:27 +0000)]
[Test only] Move deflate tests from PerMessageCompressTest to PerMessageDeflateTest

- empty message test
- message with null character test

After clean up, we'll delete permessage-compress support and


Review URL: https://codereview.appspot.com/97700043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@803 4ff78f4a-9131-11de-b045-6380ec9940d4

3 months agoAdd a sample CGI script for testing effect of HTTP headers on the origin page
tyoshino@chromium.org [Fri, 23 May 2014 07:12:32 +0000 (07:12 +0000)]
Add a sample CGI script for testing effect of HTTP headers on the origin page


Review URL: https://codereview.appspot.com/98450047

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@802 4ff78f4a-9131-11de-b045-6380ec9940d4

3 months agoFix server_no_context_takeover implementation
tyoshino@chromium.org [Fri, 23 May 2014 07:10:10 +0000 (07:10 +0000)]
Fix server_no_context_takeover implementation

_deflater needs to be reset to None after generating the last frame using
current _deflater.


Review URL: https://codereview.appspot.com/98440047

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@801 4ff78f4a-9131-11de-b045-6380ec9940d4

3 months agoFix test function name: Frame -> frame
tyoshino@chromium.org [Thu, 22 May 2014 07:41:00 +0000 (07:41 +0000)]
Fix test function name: Frame -> frame

Review URL: https://codereview.appspot.com/98420049

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@800 4ff78f4a-9131-11de-b045-6380ec9940d4

3 months agoMake send_message() with end=False generate frame when permessage-deflate is enabled
tyoshino@chromium.org [Wed, 21 May 2014 02:00:43 +0000 (02:00 +0000)]
Make send_message() with end=False generate frame when permessage-deflate is enabled

Currently, data passed by send_message() with end=False is buffered inside the
deflater object. To be consistent with send_message()'s behavior when
permessage-deflate is not enabled, make it flush given data.

This CL also adds tests to check how permessage-deflate's implementation
generates fragments.


Review URL: https://codereview.appspot.com/95480043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@799 4ff78f4a-9131-11de-b045-6380ec9940d4

3 months agoRefine pydoc of standalone.py
tyoshino@chromium.org [Wed, 30 Apr 2014 07:42:06 +0000 (07:42 +0000)]
Refine pydoc of standalone.py

- Refine instructions for TLS support
- Add underlines to headings
- Replace examples to ones with PYTHONPATH env setter
- Add note about how relative paths passed to TLS related parameters
  are resolved


Review URL: https://codereview.appspot.com/98800043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@798 4ff78f4a-9131-11de-b045-6380ec9940d4

4 months agoRemove MozWebSocket support from console.html
tyoshino@chromium.org [Fri, 25 Apr 2014 06:21:26 +0000 (06:21 +0000)]
Remove MozWebSocket support from console.html


Review URL: https://codereview.appspot.com/90460044

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@797 4ff78f4a-9131-11de-b045-6380ec9940d4

4 months agoRemove HyBi 08 version protocol support
tyoshino@chromium.org [Wed, 23 Apr 2014 10:01:36 +0000 (10:01 +0000)]
Remove HyBi 08 version protocol support


Review URL: https://codereview.appspot.com/90490043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@794 4ff78f4a-9131-11de-b045-6380ec9940d4

5 months agoAdd a simple handler cookie_wsh.py useful for cookie test
tyoshino@chromium.org [Tue, 25 Mar 2014 10:26:10 +0000 (10:26 +0000)]
Add a simple handler cookie_wsh.py useful for cookie test

Release note: Add a simple handler cookie_wsh.py useful for cookie test

Review URL: https://codereview.appspot.com/79430043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@793 4ff78f4a-9131-11de-b045-6380ec9940d4

5 months agoSplit XHR benchmark code into xhr_benchmark_handler.py
tyoshino@chromium.org [Tue, 25 Mar 2014 05:34:58 +0000 (05:34 +0000)]
Split XHR benchmark code into xhr_benchmark_handler.py

Release note: [XHR benchmark tool] Split XHR benchmark code into xhr_benchmark_handler.py


Review URL: https://codereview.appspot.com/79420043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@792 4ff78f4a-9131-11de-b045-6380ec9940d4

10 months agoPrint extensions attribute on open event.
tyoshino@chromium.org [Thu, 24 Oct 2013 07:28:58 +0000 (07:28 +0000)]
Print extensions attribute on open event.


Review URL: https://codereview.appspot.com/16280047

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@790 4ff78f4a-9131-11de-b045-6380ec9940d4

10 months agobenchmark.html typo fix
tyoshino@chromium.org [Fri, 18 Oct 2013 06:46:31 +0000 (06:46 +0000)]
benchmark.html typo fix


Review URL: https://codereview.appspot.com/14920043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@788 4ff78f4a-9131-11de-b045-6380ec9940d4

10 months agoRename parameter names to follow the permessage-deflate spec change.
yhirano@chromium.org [Thu, 17 Oct 2013 04:17:15 +0000 (04:17 +0000)]
Rename parameter names to follow the permessage-deflate spec change.

Replace s2c_ and c2s_ with server_ and client_ respectively.


Review URL: https://codereview.appspot.com/14664044

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@787 4ff78f4a-9131-11de-b045-6380ec9940d4

11 months agoAttempt to print client cert info only when the client sends it.
tyoshino@chromium.org [Thu, 26 Sep 2013 08:25:35 +0000 (08:25 +0000)]
Attempt to print client cert info only when the client sends it.


Review URL: https://codereview.appspot.com/13308047

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@786 4ff78f4a-9131-11de-b045-6380ec9940d4

11 months agoAdd a _Deflater/_Inflater test against big random section input
tyoshino@chromium.org [Tue, 10 Sep 2013 03:11:59 +0000 (03:11 +0000)]
Add a _Deflater/_Inflater test against big random section input


Review URL: https://codereview.appspot.com/13381043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@785 4ff78f4a-9131-11de-b045-6380ec9940d4

11 months ago[XHR benchmark tool] Verify Blob response
tyoshino@chromium.org [Tue, 10 Sep 2013 03:10:51 +0000 (03:10 +0000)]
[XHR benchmark tool] Verify Blob response

Release note: [XHR benchmark tool] Verify Blob response


Review URL: https://codereview.appspot.com/13585043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@784 4ff78f4a-9131-11de-b045-6380ec9940d4

11 months agoGroup benchmark parameters into one dict.
tyoshino@chromium.org [Thu, 29 Aug 2013 02:27:31 +0000 (02:27 +0000)]
Group benchmark parameters into one dict.

Release note: n/a


Review URL: https://codereview.appspot.com/13272043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@783 4ff78f4a-9131-11de-b045-6380ec9940d4

11 months agoAdd blob support to xhr_benchmark.html
tyoshino@chromium.org [Thu, 29 Aug 2013 02:26:23 +0000 (02:26 +0000)]
Add blob support to xhr_benchmark.html

Release note: Add blob support to xhr_benchmark.html


Review URL: https://codereview.appspot.com/13277043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@782 4ff78f4a-9131-11de-b045-6380ec9940d4

12 months agoAdd XMLHttpRequest benchmark functionality
tyoshino@chromium.org [Tue, 27 Aug 2013 09:17:23 +0000 (09:17 +0000)]
Add XMLHttpRequest benchmark functionality

For two special path, pywebsocket serves as an HTTP server to help xhr_benchmark.html.

Release note: Add XMLHttpRequest benchmark functionality


Review URL: https://codereview.appspot.com/9738050

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@781 4ff78f4a-9131-11de-b045-6380ec9940d4

12 months agoFix wrong variable in verifyAcknowledgement function in util.js
tyoshino@chromium.org [Mon, 26 Aug 2013 05:10:47 +0000 (05:10 +0000)]
Fix wrong variable in verifyAcknowledgement function in util.js

Release note: bug fix in benchmark tool error handling


Review URL: https://codereview.appspot.com/12822046

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@780 4ff78f4a-9131-11de-b045-6380ec9940d4

12 months agoLog when get_extension_response is called on inactivated processor
tyoshino@chromium.org [Mon, 29 Jul 2013 08:12:14 +0000 (08:12 +0000)]
Log when get_extension_response is called on inactivated processor

Release note: n/a


Review URL: https://codereview.appspot.com/10921044

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@779 4ff78f4a-9131-11de-b045-6380ec9940d4

12 months agoComments on the available extension list and the extension getting method
tyoshino@chromium.org [Mon, 29 Jul 2013 07:55:46 +0000 (07:55 +0000)]
Comments on the available extension list and the extension getting method

Clarify that they're for server side only.

Release note: n/a


Review URL: https://codereview.appspot.com/11089043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@778 4ff78f4a-9131-11de-b045-6380ec9940d4

13 months agoIntroduce window_bits constructor parameter to util._Inflate.
yhirano@chromium.org [Wed, 10 Jul 2013 08:19:44 +0000 (08:19 +0000)]
Introduce window_bits constructor parameter to util._Inflate.

This change enables us to delete a dirty hack in a Blink layout test.
See http://crbug.com/235822 .


Review URL: https://codereview.appspot.com/11099043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@777 4ff78f4a-9131-11de-b045-6380ec9940d4

13 months agoMove functions that are useful also for xhr benchmark.
tyoshino@chromium.org [Wed, 10 Jul 2013 07:43:52 +0000 (07:43 +0000)]
Move functions that are useful also for xhr benchmark.

xhr benchmark tool is coming. This is preparation for it.


Review URL: https://codereview.appspot.com/10799045

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@776 4ff78f4a-9131-11de-b045-6380ec9940d4

13 months agoTest that permessage-deflate extension uses small window if specified.
tyoshino@chromium.org [Wed, 10 Jul 2013 07:37:18 +0000 (07:37 +0000)]
Test that permessage-deflate extension uses small window if specified.


Review URL: https://codereview.appspot.com/10826045

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@775 4ff78f4a-9131-11de-b045-6380ec9940d4

13 months agoComment that we always use _RFC1979Inflater that can accept data generated with wbits=15
tyoshino@chromium.org [Wed, 10 Jul 2013 07:04:11 +0000 (07:04 +0000)]
Comment that we always use _RFC1979Inflater that can accept data generated with wbits=15

Release note: n/a


Review URL: https://codereview.appspot.com/11091043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@774 4ff78f4a-9131-11de-b045-6380ec9940d4

13 months agoRename c2s_max_window_bits related variables for readability
tyoshino@chromium.org [Wed, 10 Jul 2013 07:03:29 +0000 (07:03 +0000)]
Rename c2s_max_window_bits related variables for readability

Now we have this parameter in both client-to-server and server-to-client
direction. Variables we have now have confusing names.

Release note: n/a


Review URL: https://codereview.appspot.com/10962045

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@773 4ff78f4a-9131-11de-b045-6380ec9940d4

13 months agoMake echo_client.py announce c2s_max_window_bits capability
tyoshino@chromium.org [Wed, 10 Jul 2013 04:03:23 +0000 (04:03 +0000)]
Make echo_client.py announce c2s_max_window_bits capability

TEST=Tested connecting pywebsocket

Review URL: https://codereview.appspot.com/11038043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@772 4ff78f4a-9131-11de-b045-6380ec9940d4

13 months agoAdd retry logic to the socket creation code in clients for testing.
tyoshino@chromium.org [Tue, 9 Jul 2013 13:22:58 +0000 (13:22 +0000)]
Add retry logic to the socket creation code in clients for testing.

Release note: n/a


Review URL: https://codereview.appspot.com/9040046

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@771 4ff78f4a-9131-11de-b045-6380ec9940d4

13 months agoRemove an obsolete parameter from _run_server and add some file comment.
tyoshino@chromium.org [Tue, 9 Jul 2013 12:43:54 +0000 (12:43 +0000)]
Remove an obsolete parameter from _run_server and add some file comment.

Release note: n/a


Review URL: https://codereview.appspot.com/8956043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@770 4ff78f4a-9131-11de-b045-6380ec9940d4

14 months agoMove logging code to util.js
tyoshino@chromium.org [Fri, 31 May 2013 05:50:51 +0000 (05:50 +0000)]
Move logging code to util.js


Review URL: https://codereview.appspot.com/9711045

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@769 4ff78f4a-9131-11de-b045-6380ec9940d4

14 months agoMake eventsource.html report more info
tyoshino@chromium.org [Thu, 30 May 2013 03:13:16 +0000 (03:13 +0000)]
Make eventsource.html report more info

- Show note about --cgi_path parameter
- Print onopen and onerror event
- Add id to the stream


Review URL: https://codereview.appspot.com/9788045

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@768 4ff78f4a-9131-11de-b045-6380ec9940d4

15 months ago[echo_client] Exit when an extension is enabled and an old protocol which does not...
tyoshino@chromium.org [Wed, 1 May 2013 10:20:08 +0000 (10:20 +0000)]
[echo_client] Exit when an extension is enabled and an old protocol which does not support extensions is specified

Release note: Exit echo_client when an extension is enabled and an old protocol is specified.

Review URL: https://codereview.appspot.com/9072043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@767 4ff78f4a-9131-11de-b045-6380ec9940d4

15 months agoRemove unnecessary line configuring server's stderr. test_version_check.
tyoshino@chromium.org [Wed, 1 May 2013 03:17:18 +0000 (03:17 +0000)]
Remove unnecessary line configuring server's stderr. test_version_check.

pywebsocket server doesn't output anything annoying for this test case.

Release note: n/a

Review URL: https://codereview.appspot.com/8955043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@766 4ff78f4a-9131-11de-b045-6380ec9940d4

15 months agoAdd instruction how to configure WebSocket extensions to pydoc.
tyoshino@chromium.org [Tue, 30 Apr 2013 08:17:35 +0000 (08:17 +0000)]
Add instruction how to configure WebSocket extensions to pydoc.

Release note: mod_pywebsocket directory pydoc update. Added note about extension configuration

Review URL: https://codereview.appspot.com/8954043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@765 4ff78f4a-9131-11de-b045-6380ec9940d4

16 months agoAdd permessage-deflate support to echo_client.py
tyoshino@chromium.org [Thu, 25 Apr 2013 14:12:16 +0000 (14:12 +0000)]
Add permessage-deflate support to echo_client.py

Release note: Add permessage-deflate support to echo_client.py

Review URL: https://codereview.appspot.com/8906043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@764 4ff78f4a-9131-11de-b045-6380ec9940d4

16 months agoc2s_max_window_bits parameter for a client can be configured only if the client allow...
yhirano@chromium.org [Wed, 24 Apr 2013 01:16:26 +0000 (01:16 +0000)]
c2s_max_window_bits parameter for a client can be configured only if the client allows it.

Review URL: https://codereview.appspot.com/8911046

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@763 4ff78f4a-9131-11de-b045-6380ec9940d4

16 months agoAdd tests on the extension processor registry
tyoshino@chromium.org [Mon, 22 Apr 2013 09:04:48 +0000 (09:04 +0000)]
Add tests on the extension processor registry

Release note: n/a (test only change)

Review URL: https://codereview.appspot.com/8782045

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@762 4ff78f4a-9131-11de-b045-6380ec9940d4

16 months agoDefine a constant for sleep time for warming up the server.
tyoshino@chromium.org [Mon, 22 Apr 2013 07:41:12 +0000 (07:41 +0000)]
Define a constant for sleep time for warming up the server.

Release note: n/a (test only change)

Review URL: https://codereview.appspot.com/8782044

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@761 4ff78f4a-9131-11de-b045-6380ec9940d4

16 months agoRestore x-webkit-deflate-frame extension removed at r751.
yhirano@chromium.org [Mon, 22 Apr 2013 04:38:52 +0000 (04:38 +0000)]
Restore x-webkit-deflate-frame extension removed at r751.

The extension needs to be implemented for testing the blink implementation.

Review URL: https://codereview.appspot.com/8902045

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@760 4ff78f4a-9131-11de-b045-6380ec9940d4

16 months agoAdd tests for permessage-deflate in test_msgutil.py.
tyoshino@chromium.org [Fri, 19 Apr 2013 04:30:15 +0000 (04:30 +0000)]
Add tests for permessage-deflate in test_msgutil.py.

Since the existing tests for permessage-compress covers most of code path
used for permessage-deflate, I don't add the same ones, but just these simple
two cases.

Release note: n/a (test only change)

Review URL: https://codereview.appspot.com/8541048

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@759 4ff78f4a-9131-11de-b045-6380ec9940d4

16 months agoShorten test method names where it's clear which protocol is tested.
tyoshino@chromium.org [Thu, 18 Apr 2013 02:07:28 +0000 (02:07 +0000)]
Shorten test method names where it's clear which protocol is tested.

Review URL: https://codereview.appspot.com/8540047

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@757 4ff78f4a-9131-11de-b045-6380ec9940d4

16 months agoPrint time, filename and line number like google-glog to ease debugging rather than...
tyoshino@chromium.org [Wed, 17 Apr 2013 03:28:35 +0000 (03:28 +0000)]
Print time, filename and line number like google-glog to ease debugging rather than printing class name.

Review URL: https://codereview.appspot.com/8534046

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@756 4ff78f4a-9131-11de-b045-6380ec9940d4

16 months agoSplit EndToEndTest into smaller classes
tyoshino@chromium.org [Tue, 16 Apr 2013 11:13:04 +0000 (11:13 +0000)]
Split EndToEndTest into smaller classes

After this, I'm going to shorten test methods.

Release note: n/a (test only change)

Review URL: https://codereview.appspot.com/8792043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@755 4ff78f4a-9131-11de-b045-6380ec9940d4

16 months agoAdd permessage-deflate tests on two-message cases.
tyoshino@chromium.org [Tue, 16 Apr 2013 08:42:50 +0000 (08:42 +0000)]
Add permessage-deflate tests on two-message cases.

Review URL: https://codereview.appspot.com/8537044

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@754 4ff78f4a-9131-11de-b045-6380ec9940d4

16 months agoRename extension processor classes to match extension identifier.
tyoshino@chromium.org [Tue, 16 Apr 2013 07:22:25 +0000 (07:22 +0000)]
Rename extension processor classes to match extension identifier.

Bonus: Remove commented out x-webkit prefixed extension registration code
    which now are never going to live.

Review URL: https://codereview.appspot.com/8576046

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@753 4ff78f4a-9131-11de-b045-6380ec9940d4

16 months agoAdd permessage-deflate support.
tyoshino@chromium.org [Tue, 16 Apr 2013 05:52:56 +0000 (05:52 +0000)]
Add permessage-deflate support.

Review URL: https://codereview.appspot.com/8666044

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@752 4ff78f4a-9131-11de-b045-6380ec9940d4

16 months agoFix extension parameter parsing code of deflate extensions.
tyoshino@chromium.org [Mon, 15 Apr 2013 05:40:49 +0000 (05:40 +0000)]
Fix extension parameter parsing code of deflate extensions.

They were not passing parsed integer value to deflate/inflate classes.

Release note: Fix broken extension parameter parsing code of perframe-deflate,
    x-webkit-perframe-deflate, permessage-compression and
Review URL: https://codereview.appspot.com/8589046

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@751 4ff78f4a-9131-11de-b045-6380ec9940d4

16 months agoFactor out framing part of deflate method of permessage-compress extension into a...
tyoshino@chromium.org [Thu, 11 Apr 2013 08:17:49 +0000 (08:17 +0000)]
Factor out framing part of deflate method of permessage-compress extension into a separate class.

It's going to be used for permessage-deflate implementation.

Release note: n/a (no behavior change)
Review URL: https://codereview.appspot.com/8411044

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@750 4ff78f4a-9131-11de-b045-6380ec9940d4

16 months agoAdd note about methods for setting c2s parameter.
tyoshino@chromium.org [Thu, 11 Apr 2013 07:18:51 +0000 (07:18 +0000)]
Add note about methods for setting c2s parameter.

c2s methods are just for negotiation testing.

Release note: n/a (comment only)

Review URL: https://codereview.appspot.com/8589045

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@749 4ff78f4a-9131-11de-b045-6380ec9940d4

16 months agoFactor out part of compression stats calculation code into a separate class.
tyoshino@chromium.org [Mon, 8 Apr 2013 14:04:48 +0000 (14:04 +0000)]
Factor out part of compression stats calculation code into a separate class.

Release note: n/a (no behavior change)
Review URL: https://codereview.appspot.com/8411043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@748 4ff78f4a-9131-11de-b045-6380ec9940d4

16 months agoMake window bits parameter validation stricter.
tyoshino@chromium.org [Mon, 8 Apr 2013 10:11:54 +0000 (10:11 +0000)]
Make window bits parameter validation stricter.

Unittests are also added.

Release note: LZ77 window bits related extension parameter with leading zeroes will be rejected.
Review URL: https://codereview.appspot.com/8347044

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@747 4ff78f4a-9131-11de-b045-6380ec9940d4

16 months ago[Bug fix] Do zero check on the value to be a denominator in incoming DEFLATE ratio...
tyoshino@chromium.org [Mon, 8 Apr 2013 04:41:10 +0000 (04:41 +0000)]
[Bug fix] Do zero check on the value to be a denominator in incoming DEFLATE ratio calculation.

Release note: same as CL title
Review URL: https://codereview.appspot.com/8408043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@746 4ff78f4a-9131-11de-b045-6380ec9940d4

16 months agoGive more descriptive name for _deflater and _inflater (prefix _rfc1979)
tyoshino@chromium.org [Fri, 5 Apr 2013 11:30:09 +0000 (11:30 +0000)]
Give more descriptive name for _deflater and _inflater (prefix _rfc1979)
Review URL: https://codereview.appspot.com/8401046

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@745 4ff78f4a-9131-11de-b045-6380ec9940d4

16 months agoStop deflate-stream support.
tyoshino@chromium.org [Thu, 4 Apr 2013 09:27:11 +0000 (09:27 +0000)]
Stop deflate-stream support.

Buffer draining code that was required to close deflate-stream enabled
session cleanly will be also removed.
Review URL: https://codereview.appspot.com/8358043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@744 4ff78f4a-9131-11de-b045-6380ec9940d4

17 months agoUpdate version 0.7.8 -> 0.7.9
tyoshino@chromium.org [Mon, 18 Mar 2013 14:14:59 +0000 (14:14 +0000)]
Update version 0.7.8 -> 0.7.9

Bonus: remove the URL of RFC 6455 from description. It's too long.
Review URL: https://codereview.appspot.com/7690045

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@742 4ff78f4a-9131-11de-b045-6380ec9940d4

17 months agoUse unparsed_uri to build Sec-WebSocket-Location header.
tyoshino@chromium.org [Mon, 18 Mar 2013 06:25:01 +0000 (06:25 +0000)]
Use unparsed_uri to build Sec-WebSocket-Location header.

Release note: Changed Sec-WebSocket-Location to include the query part.

BUG= https://code.google.com/p/pywebsocket/issues/detail?id=68
Review URL: https://codereview.appspot.com/7568046

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@741 4ff78f4a-9131-11de-b045-6380ec9940d4

17 months agoMove out the code for the deflate-stream extension into a separate file.
tyoshino@chromium.org [Fri, 15 Mar 2013 12:31:15 +0000 (12:31 +0000)]
Move out the code for the deflate-stream extension into a separate file.

Release note: DeflateStreamExtensionProcessor moves to deflate_stream_extension.py.
Review URL: https://codereview.appspot.com/7847043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@740 4ff78f4a-9131-11de-b045-6380ec9940d4

17 months agoFactor out window bits value validation code into a separate function.
tyoshino@chromium.org [Fri, 15 Mar 2013 12:29:15 +0000 (12:29 +0000)]
Factor out window bits value validation code into a separate function.

Release note: n/a
Review URL: https://codereview.appspot.com/7643044

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@739 4ff78f4a-9131-11de-b045-6380ec9940d4

17 months agoMove HyBi 00 specific functions to hybi00.py.
tyoshino@chromium.org [Wed, 13 Mar 2013 09:00:56 +0000 (09:00 +0000)]
Move HyBi 00 specific functions to hybi00.py.

Release note: n/a
Review URL: https://codereview.appspot.com/7645045

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@738 4ff78f4a-9131-11de-b045-6380ec9940d4

17 months agoAdd a simple example of the EventSource API for comparison with WebSocket
tyoshino@chromium.org [Wed, 13 Mar 2013 02:13:04 +0000 (02:13 +0000)]
Add a simple example of the EventSource API for comparison with WebSocket
Review URL: https://codereview.appspot.com/7569045

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@737 4ff78f4a-9131-11de-b045-6380ec9940d4

17 months agoAdd a benchmark tool for the ArrayBuffer and some refactoring on benchmark.html
tyoshino@chromium.org [Tue, 12 Mar 2013 08:45:01 +0000 (08:45 +0000)]
Add a benchmark tool for the ArrayBuffer and some refactoring on benchmark.html
Review URL: https://codereview.appspot.com/7516047

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@736 4ff78f4a-9131-11de-b045-6380ec9940d4

17 months agoAdd an option to standalone.py to choose TLS module to use
tyoshino@chromium.org [Tue, 12 Mar 2013 04:07:50 +0000 (04:07 +0000)]
Add an option to standalone.py to choose TLS module to use
Review URL: https://codereview.appspot.com/7685045

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@735 4ff78f4a-9131-11de-b045-6380ec9940d4

17 months agofast_masking: Remember the last index in masking key
tyoshino@chromium.org [Wed, 6 Mar 2013 09:01:05 +0000 (09:01 +0000)]
fast_masking: Remember the last index in masking key

RepeatedXorMasker.mask must use the masking key byte next to one used for the last
mask call. Make fast_masking library take masking index and _mask_using_swig method
update self._masking_key_index.

Also, this CL fixes unittest for util.py. It was using three byte data as
masking keys for testing. Masking keys are always 4 byte and fast_masking cannot
handle such a mask.
Review URL: https://codereview.appspot.com/7480045

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@734 4ff78f4a-9131-11de-b045-6380ec9940d4

17 months agoWrap socket._fileobject instances made from OpenSSL.SSL.Connection instances for...
tyoshino@chromium.org [Wed, 6 Mar 2013 07:09:42 +0000 (07:09 +0000)]
Wrap socket._fileobject instances made from OpenSSL.SSL.Connection instances for some tweak.

The Connection instances raise special exceptions. We need to catch and
convert/dismiss them to meet the expectation of SocketServer.
Review URL: https://codereview.appspot.com/7365051

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@733 4ff78f4a-9131-11de-b045-6380ec9940d4

17 months agoChange benchmark tool to measure performance for each direction.
tyoshino@chromium.org [Tue, 5 Mar 2013 06:35:52 +0000 (06:35 +0000)]
Change benchmark tool to measure performance for each direction.
Review URL: https://codereview.appspot.com/7303084

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@731 4ff78f4a-9131-11de-b045-6380ec9940d4

17 months agoOverride shutdown method on _StandaloneSSLConnection object to strip "how" argument.
tyoshino@chromium.org [Tue, 5 Mar 2013 06:30:44 +0000 (06:30 +0000)]
Override shutdown method on _StandaloneSSLConnection object to strip "how" argument.

Normal socket has "how" argument but OpenSSL.SSL.Connection doesn't. To avoid
an error, insert a function to remove the argument.

Quit if --tls-client-auth is specified but ssl module is not available.
We log that at critical level now but forgot to exit.
Review URL: https://codereview.appspot.com/7374048

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@730 4ff78f4a-9131-11de-b045-6380ec9940d4

17 months agoAdd C++ based faster masking library.
tyoshino@chromium.org [Tue, 5 Mar 2013 05:25:25 +0000 (05:25 +0000)]
Add C++ based faster masking library.

Making key related variables in util.py are renamed to less confusing names.
Review URL: https://codereview.appspot.com/7306103

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@729 4ff78f4a-9131-11de-b045-6380ec9940d4

17 months agoTLS optional client cert support
toyoshim@chromium.org [Mon, 4 Mar 2013 11:17:17 +0000 (11:17 +0000)]
TLS optional client cert support

Currently pywebsocket support client cert auth, but it is only mandatory case.
Chromium implement optional case and this change is required to confirm its


Review URL: https://codereview.appspot.com/7461047

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@728 4ff78f4a-9131-11de-b045-6380ec9940d4

18 months agoPrint cipher in use.
tyoshino@chromium.org [Fri, 22 Feb 2013 08:11:07 +0000 (08:11 +0000)]
Print cipher in use.
Review URL: https://codereview.appspot.com/7376048

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@727 4ff78f4a-9131-11de-b045-6380ec9940d4

18 months agoStop using bytes which is built-in type name.
tyoshino@chromium.org [Tue, 19 Feb 2013 08:40:03 +0000 (08:40 +0000)]
Stop using bytes which is built-in type name.
Review URL: https://codereview.appspot.com/7311095

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@726 4ff78f4a-9131-11de-b045-6380ec9940d4

18 months agoSimple benchmark page.
tyoshino@chromium.org [Wed, 6 Feb 2013 16:44:58 +0000 (16:44 +0000)]
Simple benchmark page.
Review URL: https://codereview.appspot.com/7309044

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@725 4ff78f4a-9131-11de-b045-6380ec9940d4

18 months agoAdd a handler which rejects all extensions.
tyoshino@chromium.org [Tue, 5 Feb 2013 05:21:10 +0000 (05:21 +0000)]
Add a handler which rejects all extensions.
Review URL: https://codereview.appspot.com/7015043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@723 4ff78f4a-9131-11de-b045-6380ec9940d4

18 months agoRename variables named bytes which is built-in type name of Python.
tyoshino@chromium.org [Mon, 4 Feb 2013 08:31:33 +0000 (08:31 +0000)]
Rename variables named bytes which is built-in type name of Python.
Review URL: https://codereview.appspot.com/7203060

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@722 4ff78f4a-9131-11de-b045-6380ec9940d4

18 months agoAdd an option to disable SSL compression.
tyoshino@chromium.org [Mon, 4 Feb 2013 08:04:22 +0000 (08:04 +0000)]
Add an option to disable SSL compression.
Review URL: https://codereview.appspot.com/7194054

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@721 4ff78f4a-9131-11de-b045-6380ec9940d4

18 months agoAdd extra_headers attribute to request object to allow users to append their
tyoshino@chromium.org [Fri, 1 Feb 2013 06:57:36 +0000 (06:57 +0000)]
Add extra_headers attribute to request object to allow users to append their
own headers to the WebSocket handshake.

BUG= http://code.google.com/p/pywebsocket/issues/detail?id=127
Review URL: https://codereview.appspot.com/7197056

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@720 4ff78f4a-9131-11de-b045-6380ec9940d4

19 months agoAdd subprotocol box.
tyoshino@chromium.org [Fri, 25 Jan 2013 05:58:07 +0000 (05:58 +0000)]
Add subprotocol box.
Review URL: https://codereview.appspot.com/7017043

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@719 4ff78f4a-9131-11de-b045-6380ec9940d4

20 months agoFix log text written assuming Stream is used only by server.
tyoshino@chromium.org [Wed, 28 Nov 2012 14:16:09 +0000 (14:16 +0000)]
Fix log text written assuming Stream is used only by server.

It's used by echo_client.py too.
Review URL: https://codereview.appspot.com/6855111

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@718 4ff78f4a-9131-11de-b045-6380ec9940d4

20 months agoAdd getpeername to TLSSocket.
tyoshino@chromium.org [Wed, 28 Nov 2012 14:15:33 +0000 (14:15 +0000)]
Add getpeername to TLSSocket.
Review URL: https://codereview.appspot.com/6856109

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@717 4ff78f4a-9131-11de-b045-6380ec9940d4

20 months agoPrint cipher in use.
tyoshino@chromium.org [Wed, 28 Nov 2012 14:14:56 +0000 (14:14 +0000)]
Print cipher in use.

Bonus: remove do_handshake call for ssl module. it's done on wrap_socket call.
Review URL: https://codereview.appspot.com/6842110

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@716 4ff78f4a-9131-11de-b045-6380ec9940d4

20 months ago[mux] Support drop code 3009
bashi@chromium.org [Wed, 28 Nov 2012 09:06:31 +0000 (09:06 +0000)]
[mux] Support drop code 3009

Raise LogicalChannelError when a bad fragmented inner frame is detected.

Review URL: https://codereview.appspot.com/6854059

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@715 4ff78f4a-9131-11de-b045-6380ec9940d4

21 months ago[mux] Extension support for logical channel
bashi@chromium.org [Fri, 16 Nov 2012 01:09:39 +0000 (01:09 +0000)]
[mux] Extension support for logical channel

- Set StreamOptions to logical channel.
- Pass mux_handler.extensiosn() to HandshakeDeltaBase when creating
  implicit opend connection.

Review URL: https://codereview.appspot.com/6849056

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@714 4ff78f4a-9131-11de-b045-6380ec9940d4

21 months ago[mux] Use physical_connection.send_message() to send logical message
bashi@chromium.org [Thu, 15 Nov 2012 04:22:44 +0000 (04:22 +0000)]
[mux] Use physical_connection.send_message() to send logical message

_PhysicalConnectionWriter should use physical_stream.send_message()
instead of physical_connection.write() so that frame filters and
message filters of the physical connection are applied.

- Added a flag to Stream.close_connection(). This flag is True when the
  caller want to wait the response. _PhysicalConnectionWriter sets this
  flag to False to suppress calling receive_message() in
  close_connection() because the reader thread will receive the response
  (if any).
- Changed helper functions (e.g. _create_add_channel_response) not to
  enclose a logical frame into a physical frame.
  physical_connection.send_message() will wrap a logical message in a
  physical frame.
- Send close message when the writer thread finishes.
- _LogicalStream._write_inner_frame() no longer wraps a logical (inner)
  frame into a physical frame, too.
- Changed _LogicalStream._create_inner_frame() to apply frame filters to
  a logical frame.
- Changed _LogicalStream.send_message() to apply message filters to
  a logical message.

Review URL: https://codereview.appspot.com/6850048

git-svn-id: https://pywebsocket.googlecode.com/svn/trunk/src@713 4ff78f4a-9131-11de-b045-6380ec9940d4