Skip to content

Commit

Permalink
Move examples to webcast repo, cleanup some Printf.printf, accept only
Browse files Browse the repository at this point in the history
webcast protocol.
  • Loading branch information
toots committed Jul 20, 2013
1 parent 8d2bf32 commit ecaf1bd
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 612 deletions.
6 changes: 5 additions & 1 deletion src/tools/harbor.camlp4
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,11 @@ let handle_client ~port ~icy h =
in
let hprotocol =
try
if hmethod = `Get && assoc_uppercase "UPGRADE" headers <> "websocket" then raise Exit;
if hmethod = `Get &&
assoc_uppercase "UPGRADE" headers <> "websocket" then
raise Exit;
if assoc_uppercase "SEC-WEBSOCKET-PROTOCOL" headers <> "webcast" then

This comment has been minimized.

Copy link
@smimram

smimram Jul 21, 2013

Member

I am no really sure that this is a good idea: can you enforce the protocol in the browser???

This comment has been minimized.

Copy link
@toots

toots Jul 21, 2013

Author Member

Why do you think it's not a good idea?

This comment has been minimized.

Copy link
@smimram

smimram Jul 21, 2013

Member

Ok, I found out that you can specify the protocol in the client side, so I'm fine with this if my examples are still working!

raise Exit;
`Websocket
with
| _ -> hprotocol
Expand Down
5 changes: 5 additions & 0 deletions src/tools/harbor.ml
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,11 @@ let handle_client ~port ~icy h = (* Read and process lines *)
((assoc_uppercase "UPGRADE" headers) <> "websocket")
then raise Exit
else ();
if
(assoc_uppercase "SEC-WEBSOCKET-PROTOCOL" headers) <>
"webcast"
then raise Exit
else ();
`Websocket)
with | _ -> hprotocol
in
Expand Down
19 changes: 0 additions & 19 deletions test/Makefile

This file was deleted.

30 changes: 0 additions & 30 deletions test/README

This file was deleted.

93 changes: 0 additions & 93 deletions test/lame.html

This file was deleted.

60 changes: 0 additions & 60 deletions test/old/httpserver.ml

This file was deleted.

57 changes: 0 additions & 57 deletions test/old/test.html

This file was deleted.

Loading

2 comments on commit ecaf1bd

@smimram
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should really try to keep some doc and examples in Liquidsoap I think... (of course not in the test dir...)

@toots
Copy link
Member Author

@toots toots commented on ecaf1bd Jul 21, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Not sure how to do it, tho, will think about it.

Please sign in to comment.