Discussion:
HttpOpenRequest() URL 2048 Limit?
(too old to reply)
Bhuma
2008-03-17 14:28:18 UTC
Permalink
Hi All,

Is there a limit to the length of an URL using HttpOpenRequest() ? If
the size of URL is smaller than ~2kb it works , but once the URL
get's too large, HttpOpenRequest(...) fails with error 122.
But when I execute the same url from browser(IE/netscape) ,it works.
Is it a known limitation?Had anyone experienced this issue.
Could anyone please provide me some pointers.

Thanks in advance ,
Bhuma
Volodymyr M. Shcherbyna
2008-03-18 07:57:29 UTC
Permalink
HttpOpenRequestW does quite a big amount of convertations from UNICODE to
ANSI (!) strings and then dispatches execution to HttpOpenRequestA which is
basically a stupidity, because of perfomance issues.

Try to pass big ansi buffer to ansi version of function. Does it help? If
not, we will continue investigation here.
--
V.
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by Bhuma
Hi All,
Is there a limit to the length of an URL using HttpOpenRequest() ? If
the size of URL is smaller than ~2kb it works , but once the URL
get's too large, HttpOpenRequest(...) fails with error 122.
But when I execute the same url from browser(IE/netscape) ,it works.
Is it a known limitation?Had anyone experienced this issue.
Could anyone please provide me some pointers.
Thanks in advance ,
Bhuma
Anthony Jones
2008-03-18 17:23:04 UTC
Permalink
Post by Bhuma
Hi All,
Is there a limit to the length of an URL using HttpOpenRequest() ? If
the size of URL is smaller than ~2kb it works , but once the URL
get's too large, HttpOpenRequest(...) fails with error 122.
But when I execute the same url from browser(IE/netscape) ,it works.
Is it a known limitation?Had anyone experienced this issue.
Could anyone please provide me some pointers.
Typically 2048 is considered the upper limit for a URL all though
technically there is no limit a web server may return a 414 status code for
what it considers to be an excessively long URI.

Consider posting the data as an entity body.
--
Anthony Jones - MVP ASP/ASP.NET
Bhuma
2008-04-25 07:44:44 UTC
Permalink
Post by Anthony Jones
Post by Bhuma
Hi All,
Is there a limit to the length of an URL using HttpOpenRequest() ? If
the size of URL is smaller than ~2kb it works , but once the URL
get's too large, HttpOpenRequest(...) fails with error 122.
But when I execute the same url from browser(IE/netscape) ,it works.
Is it a known limitation?Had anyone experienced this issue.
Could anyone please provide me some pointers.
Typically 2048 is considered the upper limit for a URL all though
technically there is no limit a web server may return a 414 status code for
what it considers to be an excessively long URI.
Consider posting the data as an entity body.
--
Anthony Jones - MVP ASP/ASP.NET
Many Thanks for your reply .Sorry for delayed reply too.
My problem got resolved bu using POST method.

Thanks once again,
Bhuma

Loading...