Is there a maximum length for a HTTP BASIC authentication username?

user240438 picture user240438 · Oct 26, 2010 · Viewed 14.1k times · Source

Is there a maximum length for a username or password which is sent to a web application through HTTP BASIC authentication? I looked through RFC2617 and couldn't find anything obvious, but was curious and wanted to make sure.

(This is all being done over SSL, so don't worry about security for my sake.)

Answer

bobince picture bobince · Oct 26, 2010

There's no spec-enforced limit on the auth token. However you may run into practical server-specific limits on HTTP headers in general, as outlined in this question.