URL truncated with 255 characters

I have a JavaScript widget that interacts with my Rails application by creating tags in the DOM. From time to time, I see an invalid request in my server logs, where the URL is truncated with 255 characters:

http://myapplication.example/mycontroller/1/myaction?hostname=www.mycustomer.example&request[param_a]=3&request[param_b]=1&request[param_c]=0&request[param_d]=0&request[param_e]=3&request[param_f]=1&request[param_g]=4&request[param_h]=0&request[param_i]=5&request

From Google and Stackoverflow ( What is the maximum URL length in different browsers? ), It seems that 255 characters are not a valid limit for URLs.

Here is what I know:

  • This is a sporadic problem, this does not happen in all queries
  • URL truncated at 255 characters when this happens
  • When this error occurs, the user agent is not written to backtrace

Here is what I DO NOT know:

  • In what types of browsers does this error occur? Maybe some kind of mobile browser ...

What is the best way to cause this problem?

+5
3

Root Cause - GET, POST-.

AFAIK QueryString, . , 4000 - - ( , IIS Apache, ), , . , , , , , .

POST , " " .

+3

, , RFC 2068 :

URI 255 , - .

GET, , (, IE6) ​​, .

, POST ( ), , , .

Edit: , , . , ~ 255, , .

+2

. IP-, . IP- , , . ( - Safari 5.0.5/Mac 10.6.8 IE 9.0/NT 6.1) . , , 2 , , 50 , , 255 . 2 . IP- - AT & T Worldnet, , , , , , .

, . , Safari 5 IE 9 IP-. - Windows Mac OSX, IP - , - . , , , , , ( ), , .

, , , - , , . , NAT, ? ?

0

All Articles