Автор оригинала: fixxxer
давай ты поставишь себе livehttpheaders+firebug
и скажешь что там действительно происходит а не твои домыслы
Вариант 1 (на денвер2, работает как надо):
http://icms/admin?module=user&actor_1=roles&actor_2=editRules
POST /admin?module=user&actor_1=roles&actor_2=editRules HTTP/1.1
Host: icms
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9
Accept: text/javascript, text/html, application/xml, text/xml, */*
Accept-Language: ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
X-Requested-With: XMLHttpRequest
X-Prototype-Version: 1.5.1.1
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer:
http://icms/admin?module=user&actor_1=roles&actor_2=show
Content-Length: 15
Cookie: PHPSESSID=5c5ad704c6e832377173c24931e28b34
Pragma: no-cache
Cache-Control: no-cache
controller=ajax
HTTP/1.x 200 OK
Date: Sat, 10 May 2008 18:07:42 GMT
Server: Apache/1.3.33 (Win32) PHP/5.1.6
X-Powered-By: PHP/5.1.6
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
Вариант 2 (на денвер3, если url не предварять методом POST):
http://icms/admin?module=user&actor_1=roles&actor_2=editRules
POST /admin?module=user&actor_1=roles&actor_2=editRules HTTP/1.1
Host: icms
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9
Accept: text/javascript, text/html, application/xml, text/xml, */*
Accept-Language: ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
X-Requested-With: XMLHttpRequest
X-Prototype-Version: 1.5.1.1
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer:
http://icms/admin/?module=user&actor_1=roles&actor_2=show
Content-Length: 15
Cookie: PHPSESSID=d34f32f18c3deeb3099f99522383183d
Pragma: no-cache
Cache-Control: no-cache
controller=ajax
HTTP/1.x 301 Moved Permanently
Date: Sun, 11 May 2008 06:42:28 GMT
Server: Apache/2.2.4 (Win32) mod_ssl/2.2.4 OpenSSL/0.9.8d PHP/5.2.4
Location:
http://icms/admin/?module=user&actor_1=roles&actor_2=editRules
Content-Length: 385
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1
----------------------------------------------------------
http://icms/admin/?module=user&actor_1=roles&actor_2=editRules
GET /admin/?module=user&actor_1=roles&actor_2=editRules HTTP/1.1
Host: icms
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer:
http://icms/admin/?module=user&actor_1=roles&actor_2=show
Cookie: PHPSESSID=d34f32f18c3deeb3099f99522383183d
Pragma: no-cache
Cache-Control: no-cache
HTTP/1.x 200 OK
Date: Sun, 11 May 2008 06:42:28 GMT
Server: Apache/2.2.4 (Win32) mod_ssl/2.2.4 OpenSSL/0.9.8d PHP/5.2.4
X-Powered-By: PHP/5.2.4
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=windows-1251
----------------------------------------------------------
Вариант 3 (на денвер3, вариант рабочий, но запрос выглядит кривовато):
http://icms/admin/post /admin?module=user&actor_1=roles&actor_2=editRules
POST /admin/post%20/admin?module=user&actor_1=roles&actor_2=editRules HTTP/1.1
Host: icms
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9
Accept: text/javascript, text/html, application/xml, text/xml, */*
Accept-Language: ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
X-Requested-With: XMLHttpRequest
X-Prototype-Version: 1.5.1.1
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer:
http://icms/admin/?module=user&actor_1=roles&actor_2=show
Content-Length: 15
Cookie: PHPSESSID=d34f32f18c3deeb3099f99522383183d
Pragma: no-cache
Cache-Control: no-cache
controller=ajax
HTTP/1.x 200 OK
Date: Sun, 11 May 2008 06:58:58 GMT
Server: Apache/2.2.4 (Win32) mod_ssl/2.2.4 OpenSSL/0.9.8d PHP/5.2.4
X-Powered-By: PHP/5.2.4
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 7553
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=windows-1251
Почему во втором случае сервак может отвечать 301? Запрос правильно делаю, без "http://"