Вопрос по – Какую максимальную длину URL можно передать функции Wininet, HttpOpenRequest?


Какую максимальную длину URL можно передать функции Wininet, HttpOpenRequest?

Ваш Ответ

3   ответа

Я бы предложил менее 2000 символов., но этоСтатья кб предлагает Internet Explorer имеет ограничение 2083, что также может относиться к вашему делу.

Error: User Rate Limit Exceeded Jason

но целевое серверное программное обеспечение, скорее всего, будет иметь ограничение на длину вашего URL.

Apache (Server)

My early attempts to measure the maximum URL length in web browsers bumped into a server URL length limit of approximately 4,000 characters, after which Apache produces a "413 Entity Too Large" error. I used the current up to date Apache build found in Red Hat Enterprise Linux 4. The official Apache documentation only mentions an 8,192-byte limit on an individual field in a request.

Microsoft Internet Information Server (Server)

The default limit is 16,384 characters (yes, Microsoft's web server accepts longer URLs than Microsoft's web browser). This is configurable.

Perl HTTP::Daemon (Server)

Up to 8,000 bytes will work. Those constructing web application servers with Perl's HTTP::Daemon module will encounter a 16,384 byte limit on the combined size of all HTTP request headers. This does not include POST-method form data, file uploads, etc., but it does include the URL. In practice this resulted in a 413 error when a URL was significantly longer than 8,000 characters. This limitation can be easily removed. Look for all occurrences of 16x1024 in Daemon.pm and replace them with a larger value. Of course, this does increase your exposure to denial of service attacks.


Error: User Rate Limit Exceeded
Error: User Rate Limit ExceededbelieveError: User Rate Limit Exceeded
"HttpOpenRequest does not have a maximum length" - This answerError: User Rate Limit Exceeded

// maximum field lengths (arbitrary)

#define INTERNET_MAX_PORT_NUMBER_LENGTH 5           // INTERNET_PORT is unsigned short
#define INTERNET_MAX_PORT_NUMBER_VALUE  65535       // maximum unsigned short value
#define INTERNET_MAX_PATH_LENGTH        2048
#define INTERNET_MAX_SCHEME_LENGTH      32          // longest protocol name length
                                        + sizeof("://") \
                                        + INTERNET_MAX_PATH_LENGTH)

Похожие вопросы