2

When I execute the following code...

http = Net::HTTP.start('jigsaw.w3.org')
http.request_post('/css-validator/validator', ' ', 'Content-type' => "multipart/form-data")

...then I very often get the following error:

EOFError: end of file reached
from /Users/josh/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/net/protocol.rb:153:in `read_nonblock'

Is this only me? What could be the problem? Sometimes it seems to work, but most of the time it doesn't.

Joshua Muheim
  • 12,617
  • 9
  • 76
  • 152
  • 1
    Check the answers over [here](http://stackoverflow.com/q/5244887/1860929), they might help. – Anshul Goyal Jan 20 '14 at 00:04
  • They didn't, but I noticed that the jigsaw.w3.org page itself might be the problem: could you try loading http://jigsaw.w3.org/css-validator/DOWNLOAD.html a few times in a row and tell me whether you experience problems? I often get a "No data received" message. – Joshua Muheim Jan 20 '14 at 09:23
  • When I tried running your code, I either got an `500: Internal Server Error`, or the error that you have supplied, or the call just hung up. When accessing the url `/css-validator/validator` directly, I get a Validator error. – Anshul Goyal Jan 20 '14 at 09:43
  • Could you please open http://jigsaw.w3.org/css-validator/DOWNLOAD.html in a webbrowser and reload a few times and tell me whether you have problems with this, too? – Joshua Muheim Jan 20 '14 at 10:01
  • Yeah, the css doesn't load some of the times, and the page itself doesn't load a few times. – Anshul Goyal Jan 20 '14 at 10:17
  • So it seems to be a problem on their side. Thanks for your help. I'll try to set up the command line version of it on my local machine and use this. – Joshua Muheim Jan 20 '14 at 10:22

1 Answers1

2

The problem seems to be on the side of the host:

Loading http://jigsaw.w3.org/css-validator/DOWNLOAD.html manually in a browser results most of the time in "no data received" at the moment.

I'm trying to set up the downloadable command line version of the validator on my local machine and use this. More info here: How can I validate CSS on internal web pages?

Community
  • 1
  • 1
Joshua Muheim
  • 12,617
  • 9
  • 76
  • 152