3

I am sending 8kb data on the server using web services via get(), but it gives error while if i sends little bit data then it sends successfully.

amardeep
  • 492
  • 4
  • 19

2 Answers2

2

As already mentioned, HTTP itself doesn't impose any hard-coded limit on request length; but browsers have limits ranging on the 2kb - 8kb (255 bytes if we count very old browsers).

Is there a response error defined that the server can/should return if it receives a GET request exceeds this length?

That's the one nobody has answered.

HTTP 1.1 defines Status Code 414 Request-URI Too Long for the cases where a server-defined limit is reached. You can see further details on RFC 2616.

For the case of client-defined limits, there is no sense on the server returning something, because the server won't receive the request at all.

Hope this helps.

Ghost Hacker
  • 139
  • 1
  • 1
  • 8
0

There's no "defined limit" other than if there's a maximum on the server or on the users bandwidth limit. Consider your users might get quite annoyed if they get a bill at the end of the month as you've been doing a GET on 300mb.

David
  • 19,577
  • 28
  • 108
  • 128