서버 마다 다른건가... lighttpd에서는 GET만 하면 400 에러가 발생하고
GET 다음 Host까지 해주어야 응답을 해준다.
+
GET /bin/login?User=Peter+Lee&pw=123456&action=login HTTP/1.1 Host: 127.0.0.1:8000 |
POST /bin/login HTTP/1.1 Host: 127.0.0.1:8000 Accept: image/gif, image/jpeg, */* Referer: http://127.0.0.1:8000/login.html Accept-Language: en-us Content-Type: application/x-www-form-urlencoded Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Content-Length: 37 Connection: Keep-Alive Cache-Control: no-cache
User=Peter+Lee&pw=123456&action=login |
[링크 : https://www.ntu.edu.sg/home/ehchua/programming/webprogramming/HTTP_Basics.html]
GET
/test/demo_form.asp?name1=value1&name2=value2 |
POST
POST /test/demo_form.asp HTTP/1.1 Host: w3schools.com name1=value1&name2=value2 |
[링크 : http://www.w3schools.com/Tags/ref_httpmethods.asp]
[링크 : https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html]
S.N. | Method and Description |
---|---|
1 | GET The GET method is used to retrieve information from the given server using a given URI. Requests using GET should only retrieve data and should have no other effect on the data. |
2 | HEAD Same as GET, but transfers the status line and header section only. |
3 | POST A POST request is used to send data to the server, for example, customer information, file upload, etc. using HTML forms. |
4 | PUT Replaces all current representations of the target resource with the uploaded content. |
5 | DELETE Removes all current representations of the target resource given by a URI. |
6 | CONNECT Establishes a tunnel to the server identified by a given URI. |
7 | OPTIONS Describes the communication options for the target resource. |
8 | TRACE Performs a message loop-back test along the path to the target resource. |
[링크 : https://www.tutorialspoint.com/http/http_methods.htm]
[링크 : https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods]
'Programming > web 관련' 카테고리의 다른 글
http digest (0) | 2017.03.03 |
---|---|
http header (0) | 2017.03.02 |
해싱 salt (0) | 2017.01.27 |
NPAPI / PPAPI - VLC ... (0) | 2016.01.14 |
HTML5 video player 720p/1080p 재생여부 (0) | 2016.01.13 |