WordPress.org

Make WordPress Core

Opened 11 years ago

Closed 9 years ago

#770 closed defect (bug) (duplicate)

can not get correct path info

Reported by: anonymousbugger Owned by: ryan
Milestone: Priority: normal
Severity: minor Version: 1.5
Component: General Keywords:
Focuses: Cc:

Description

get 404 when post title/subject contain chinese and use %postname% as a part of permalink.

here is some thing I found, may be help

in /wp-blog-header.php around line 26

if (! empty($rewrite)) {

$pathinfo = $_SERVERPATH_INFO?;
$req_uri = $_SERVERREQUEST_URI?;

this ($req_uri) need do some urldecode()
since the CJK/MDBS characters will be encode into %##
format, and apache (1.3 in my case) will decode it
for PATH_INFO but not for REQUEST_URI, this cause
conflict between PATH_INFO and REQUEST_URI
for example: (in case you can not see chinese
characters, I use <some_CJK_chars> instead
of real chinese characters)
URL= http://www.my.blog/index.php/%a4%a4/
PATH_INFO= /<some_CJK_chars>/
REQUEST_URI= /index.php/%a4%a4/

this cause problem for later process (ie: replace
PATH_INFO by in REPLACE_URI [line36 same .php])
when we post some chinese/japanese charactors in
postname/subject and use %postname% as a part
of permalink

$home_path = parse_url(get_settings('home'));
$home_path = $home_pathpath?;

Change History (3)

comment:1 @anonymousbugger11 years ago

  • Patch set to No

comment:2 @ryan11 years ago

  • Owner changed from anonymous to rboren
  • Status changed from new to assigned

comment:3 @mdawaffe9 years ago

  • Resolution set to duplicate
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.