Solution to HTTP/1.1 400 Bad Request returned by nc packet sending

Source: Internet
Author: User

Html> http://qiuren.blogbus.com/logs/37117725.html

 

Most of the time, you need to customize the release package when debugging the program. The Firefox plug-in can be used in normal post submission, such as Tamper Data.

However, this tool does not support uploading images or files.

At this time, it is more common to use winsock expert to capture packets, save the packet as txt, modify the txt file, and then submit the file with nc.

Before the article, I often encounter this echo when sending packets.

HTTP/1.1 400 Bad Request
Content-Type: text/html
Date: Fri, 27 Mar 2009 03:33:32 GMT
Connection: close
Content-Length: 35

Bad Request (Invalid Verb) sent 3053, rcvd 164: NOTSOCK

 

This is relatively depressing, with the ULtraEdit-32 hexadecimal editing found
1. bmp
No wonder the server is not recognized.

Find some information on the website that "Unicode, Unicode big endian and UTF-8-encoded txt file will start with a few more bytes, Are FF, FE (Unicode ), FE and FF (Unicode big endian), EF, BB, BF (UTF-8 )."

It seems that the encoding is still a problem. Change the encoding.
2. bmp

3. bmp

OK. Now it is normal.

Sometimes the "ef bb bf" Three bytes will still appear before the POST. At this time, you can use c32asm to del these three bytes.

I have to complain about this encoding problem.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.