Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Rejected Null Origin" #96

Closed
popey456963 opened this issue Feb 15, 2015 · 16 comments
Closed

"Rejected Null Origin" #96

popey456963 opened this issue Feb 15, 2015 · 16 comments
Milestone

Comments

@popey456963
Copy link


I get this when running your example application. This is after connecting to it with your sample HTML code. Running Windows 7, Norton 360, Realising that I haven't specified port and it's defaulted to 80. Connect to webpage, says SSL error. 403 forbidden. First tried it with port 8080, same error. This is after trying to access it. Any other details, please do ask for.

TEMP FIX -

./websocketd --port=8080 --staticdir html --loglevel=debug ./count.sh 
@asergeyev
Copy link
Collaborator

That's pretty odd (defaults should allow pretty much any origin and let things work)... Any chance you could run it with --loglevel=debug and send us txt file with dumped output?

@lifeofbrian
Copy link

I'm seeing this issue as well on OS X Yosemite.

Here's w/ debug loglevel enabled

bmansell$ ./websocketd --port=8080 --loglevel=debug ./count.sh 
Sat, 14 Feb 2015 17:08:28 -0800 | INFO   | server     |  | Serving using application   : ./count.sh 
Sat, 14 Feb 2015 17:08:28 -0800 | INFO   | server     |  | Starting WebSocket server   : ws://:8080/
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Std. variable: SERVER_SOFTWARE=websocketd/0.2.9
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Std. variable: REMOTE_ADDR=::1
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Std. variable: REMOTE_HOST=localhost
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Std. variable: SERVER_NAME=localhost
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Std. variable: SERVER_PORT=8080
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Std. variable: SERVER_PROTOCOL=HTTP/1.1
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Std. variable: GATEWAY_INTERFACE=websocketd-CGI/0.1
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Std. variable: REQUEST_METHOD=GET
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Std. variable: SCRIPT_NAME=/
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Std. variable: PATH_INFO=/
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Std. variable: PATH_TRANSLATED=/
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Std. variable: QUERY_STRING=
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Std. variable: AUTH_TYPE=
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Std. variable: CONTENT_LENGTH=
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Std. variable: CONTENT_TYPE=
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Std. variable: REMOTE_IDENT=
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Std. variable: REMOTE_USER=
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Std. variable: UNIQUE_ID=1423962512358485335
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Std. variable: REMOTE_PORT=55085
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Std. variable: REQUEST_URI=/
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Header variable HTTP_CONNECTION=Upgrade
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Header variable HTTP_PRAGMA=no-cache
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Header variable HTTP_UPGRADE=websocket
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Header variable HTTP_USER_AGENT=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Header variable HTTP_ACCEPT_LANGUAGE=en-US,en;q=0.8
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Header variable HTTP_CACHE_CONTROL=no-cache
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Header variable HTTP_ORIGIN=null
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Header variable HTTP_SEC_WEBSOCKET_VERSION=13
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Header variable HTTP_DNT=1
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Header variable HTTP_ACCEPT_ENCODING=gzip, deflate, sdch
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Header variable HTTP_SEC_WEBSOCKET_KEY=DIvW4qr0AMCQeNWzV0LFGw==
Sat, 14 Feb 2015 17:08:32 -0800 | DEBUG  | env        | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | Header variable HTTP_SEC_WEBSOCKET_EXTENSIONS=permessage-deflate; client_max_window_bits
Sat, 14 Feb 2015 17:08:32 -0800 | ACCESS | session    | url:'http://localhost:8080/' id:'1423962512358485335' remote:'localhost' command:'./count.sh' | rejected null origin

@asergeyev
Copy link
Collaborator

Interesting. Looks like a bug in 0.2.9 ; fixed since...
0d22926

Those who affected so far could not use file:// pages from some of the browsers.
I guess we need to tag new version shortly.

@asergeyev
Copy link
Collaborator

Workaround for now is to use something like this (copy count.html to dir named "html")

./websocketd --port=8080 --staticdir html --loglevel=debug ./count.sh 

then use http://localhost:8080/count.html to use that page that you were loading from file:// url.

@popey456963
Copy link
Author

Okay, thanks for that! Leaving this open until a more permanent solution is found.

@lifeofbrian
Copy link

Thanks @asergeyev. I confirm that this solution you've provided works.

@damondouglas
Copy link

I was able to get it to work as:

$ python -m SimpleHTTPServer 8000
$ $ websocketd --port=8080 ./count.sh

then open http://localhost:8000/

@Abundnce10
Copy link

I also used the same approach as @damondouglas (above) and that solved it for me.

@asergeyev
Copy link
Collaborator

Best solution is to install go, do

go get github.com/joewalnes/websocketd

and run websocketd from your $GOHOME/bin

@asergeyev asergeyev added this to the 0.2.10 milestone Feb 16, 2015
@asergeyev
Copy link
Collaborator

@damondouglas
Copy link

@asergeyev Works! Tested on Ubuntu 14.04.

out

@joewalnes
Copy link
Owner

Awesome!

Also, more gifs should be on this issue tracker. Looks great!

@asergeyev
Copy link
Collaborator

Wow.. What was the tool to record this? :)

@SchallerJe
Copy link

I would recommend "licecap" (http://www.cockos.com/licecap/) for gif recording. It works like a charm on OS X and Windows.

@lifeofbrian
Copy link

Thanks for getting this fix in!

@damondouglas
Copy link

@asergeyev I used gtk-recordmydesktop. Then I used ffmpeg:

$ ffmpeg -i <ogv> -s <height>x<width> -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > out.gif

where <ogv> is the output from gtk-recordmydesktop and <height>, <width> displays from the video file properties.

Courtesy: https://gist.github.com/dergachev/4627207

@SchallerJe , Yes "licecap" is awesome and I use it at work for Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants