City Public Service server fail
- May 21st, 2009
- By jrod
- Write comment
I hate the utility company in san antonio. Not only can they not read a fucking meter correctly, they cannot administer a webserver to boot. I sent this email tonight detailing an issue their server has had for over a year:
From: Jared Rodriguez <jrod@blacknode.net> To: feedback@cpsenergy.com Subject: Concerning cpsenergy.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Please have your technical staff configure your server to handle HTTP host request for cpsenergy.com properly. At present, your server is responding to requests inappropriately: ~ $ host cpsenergy.com cpsenergy.com has address 208.188.159.143 cpsenergy.com mail is handled by 10 dmsmail.cpsenergy.com. cpsenergy.com mail is handled by 5 mail.cpsenergy.com. ~ $ nc 208.188.159.143 80 HEAD / HTTP/1.1 Host: cpsenergy.com HTTP/1.1 400 Bad Request Content-Length: 39 Content-Type: text/html Date: Thu, 21 May 2009 05:11:10 GMT Connection: close ~ $ nc 208.188.159.143 80 HEAD / HTTP/1.1 Host: www.cpsenergy.com HTTP/1.1 200 OK Connection: close Date: Thu, 21 May 2009 05:11:30 GMT Server: Microsoft-IIS/6.0 Content-Length: 23019 Content-Type: text/html Set-Cookie: ASPSESSIONIDAAQCDRCA=GFEKMIDCODDEABMGDIMHBIFI; path=/ Cache-control: private I know IIS is crap, but you still should be able to configure it to at least meet rfc standards. There is nothing wrong with the following request: HEAD / HTTP/1.1 Host: cpsenergy.com So the 400 error is just plain wrong according to rfc2616:10.4.1, which states: "The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications." The server not handling client "Host:" header strings other than www.cpsenergy.com is not a breach in HTTP header syntax, its a problem with your implementation. Also, its really annoying to type cpsenergy.com and get a 400 when any rational server would spit out a 301/2 to http(s)://www.cpsenergy.com, or a 200 and load some other content. Its just plain lazy in my opinion. Jared
