[wp-trac] [WordPress Trac] #10483: Change post_name's length from 200 to 400

WordPress Trac wp-trac at lists.automattic.com
Sat Mar 19 10:56:48 UTC 2011


#10483: Change post_name's length from 200 to 400
--------------------------+-----------------------------
 Reporter:  elnur         |       Owner:  ryan
     Type:  enhancement   |      Status:  reopened
 Priority:  low           |   Milestone:  Future Release
Component:  Permalinks    |     Version:
 Severity:  minor         |  Resolution:
 Keywords:  dev-feedback  |
--------------------------+-----------------------------

Comment (by hakre):

 Replying to [comment:14 linuxologos]:
 > Replying to [comment:13 hakre]:
 > > Replying to [comment:12 linuxologos]:
 > [...]
 >
 > MySQL is able to store UTF8 indeed and that is already the fact for
 post_content and post_title in (wp_)posts table. They don't get urlencoded
 before stored in the db. post_name ''is'' urlencoded though, and I'm not
 sure if it's technically safe to alter this.

 I have not said that this is a trivial change and in fact, I can not even
 say if the project would be able to perform such changes and a refactoring
 properly at all.

 ----

 Replying to [comment:1 Denis-de-Bernardy]:
 > if my memory serves me well, the protocol actually assumes a URI is
 never longer than 255 chars.

 Indeed, RFC 2616 suggests to avoid URIs longer than 255 chars:

    The HTTP protocol does not place any a priori limit on the length of
    a URI. Servers MUST be able to handle the URI of any resource they
    serve, and SHOULD be able to handle URIs of unbounded length if they
    provide GET-based forms that could generate such URIs. A server
    SHOULD return 414 (Request-URI Too Long) status if a URI is longer
    than the server can handle (see section 10.4.15).

       Note: Servers ought to be cautious about depending on URI lengths
       above 255 bytes, because some older client or proxy
       implementations might not properly support these lengths.


 from: [http://tools.ietf.org/html/rfc2616#section-3.2.1 3.2.1 General
 Syntax]

 Next to that 255 char limit by caution, there is a physical one for the
 browsers. Microsoft Internet Explorer is introducing the lowest limit
 which is a little bit up to 2000 characters according to
 [http://www.boutell.com/newfaq/misc/urllength.html WWW FAQs: What is the
 maximum length of a URL?]. Generally these lengths relate to one-char =
 one-byte in us-ASCII encoding of an (urlencoded) URL, a subset of URI.

 I think the 414 response is something WP don't do so far, which is
 classified as [http://tools.ietf.org/html/rfc2119 SHOULD]. I have no idea
 about the overall parameters this is related to, I think those are
 undocumented so far which need to reveal those from the code-base first
 before coping with that problem which is out of the scope of this ticket
 as well.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10483#comment:15>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list