tl; dr: ââ " ". HTTP-, , , .
, , .
Django:
[05/Mar/2014 18:01:35] code 400, message Bad request syntax ('GET /checkout/wx_signature?signature=b226bb8f6e9ce2fdecb752c6808a979c62e235f7&echostr=5987526888415258224×tamp=1394042480&nonce=1394079741Content-Length: 445Connection: closeContent-Type: text/html; charset=iso-8859-1 HTTP/1.0')
" 400" HTTP 400. , HTTP- . , Django , .
, , , :
GET /checkout/wx_signature?[SIGNATURE REMOVED]Content-Length: 445Connection: closeContent-Type: text/html; charset=iso-8859-1 HTTP/1.0
HTTP-.
RFC2616 5.1:
, Request-URI , CRLF. SP. CR LF , CRLF.
Request-Line = Method SP Request-URI SP HTTP-Version CRLF
, HTTP- GET , HTTP/1.0, . , URL-, :
/checkout/wx_signature?[SIGNATURE REMOVED]Content-Length: 445Connection: closeContent-Type: text/html; charset=iso-8859-1
URL- + %20 . , , . HTTP- , URL-. , " ".
, .
RFC2616 14.13, , Content-Length HTTP 1.1. Connection Content-Type.
, URL?
, . , , , .
HTTP . , , " http://google.com". Google " http://www.google.com".
:
GET / HTTP/1.1
Host: google.com
:
HTTP/1.1 301 Moved Permanently
Location: http://www.google.com/
Content-Type: text/html; charset=UTF-8
Date: Thu, 15 May 2014 21:28:46 GMT
Expires: Sat, 14 Jun 2014 21:28:46 GMT
Cache-Control: public, max-age=2592000
Server: gws
Content-Length: 219
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Alternate-Protocol: 80:quic
[HTML content removed]
, Google ! :
HTTP/1.1 301 Moved Permanently
Location: http://www.google.com/
Content-Type: text/html; charset=UTF-8
...
Content-Length: 219
, Content-Type, Content-Length Location. , HTTP , , . , , Location?
- :
HTTP/1.1 301 Moved Permanently
Location: http://www.google.com/Content-Type: text/html; charset=UTF-8Content-Length: 219
Uh-oh... HTTP, , http://www.google.com/Content-Type: text/html; charset=UTF-8Content-Length: 219.
, ... ?
, Apache ( - ).
, " " .
, " " Location: URL-, CRLF ( HTTP, ). , HTTP/1.0 HTTP/1.1, , HTTP/1.0 .
, " " , CRLF.
, , " ", , .
.