Closed GoogleCodeExporter closed 9 years ago
In short; I really need this redirect. I don't want to put my cgi-bin directory
beneath htdocs, but side by side.
It seems that /wms/ that is correctly mapped to /cgi/bin/mapserv gets somehow
attached to the docroot of 20 where it should be matched to rule 200.
Any suggestion appreciated! I need this to migrate an existing server
architecture to
cherokee...
Original comment by milovand...@gmail.com
on 27 Nov 2008 at 9:45
This patch works for me. What do you think about it?.
Original comment by skar...@gmail.com
on 28 Nov 2008 at 1:07
Attachments:
The patch seems to be elegant, but I don't see it solving the problem...
rule_list.c:0092 ( cherokee_rule_list_match): Trying rule prio=500
rule_directory.c:0051 ( match): Match directory: rule=/test
req=/cgi-bin/mapserv: (str) ret_not_found
rule_list.c:0092 ( cherokee_rule_list_match): Trying rule prio=400
rule_request.c:0074 ( match): Request
"/cgi-bin/mapserv?map=/home/dogomaps/net/mapfiles/test.map&SERVICE=WMS&" didn't
match
with "/wms/(.*)$"
rule_list.c:0092 ( cherokee_rule_list_match): Trying rule prio=300
rule_list.c:0092 ( cherokee_rule_list_match): Trying rule prio=200
rule_directory.c:0097 ( match): Match! rule=/cgi-bin
req=/cgi-bin/mapserv web_directory=/cgi-bin: ret_ok
rule_list.c:0110 ( cherokee_rule_list_match): Merging rule prio=200
rule_list.c:0120 ( cherokee_rule_list_match): Final rule prio=200. Exiting.
connection.c:1937 (cherokee_connection_set_keepalive): Keep-alive 500
connection.c:2024 (cherokee_connection_open_request): web_directory='/cgi-bin'
request='/cgi-bin/mapserv' local_directory='/home/dogomaps/net/htdocs'
handler_cgi_base.c:0719 (cherokee_handler_cgi_base_extract_path): Pathinfo:
'(null)'
handler_cgi_base.c:0722 (cherokee_handler_cgi_base_extract_path): Executable:
'/home/dogomaps/net/htdocs/cgi-bin/mapserv'
connection.c:0400 (cherokee_connection_setup_error_handler): New handler error
thread.c:0597 ( process_active_connections): thread (0x11f85d0)
processing conn (0x125fc50), phase 7 'Init connection'
thread.c:0653 ( process_active_connections): conn on phase n=7: Init
connection
connection.c:2024 (cherokee_connection_open_request): web_directory='/cgi-bin'
request='/cgi-bin/mapserv' local_directory='/home/dogomaps/net/htdocs/'
socket.c:0960 ( cherokee_socket_bufwrite): write fd=20 len=208 ret=0
written=208
socket.c:0960 ( cherokee_socket_bufwrite): write fd=20 len=277 ret=0
written=277
thread.c:0597 ( process_active_connections): thread (0x11f85d0)
processing conn (0x125fc50), phase 12 'Lingering close'
thread.c:0653 ( process_active_connections): conn on phase n=12:
Lingering close
connection.c:1010 (cherokee_connection_linger_read): eof
connection.c:1010 (cherokee_connection_linger_read): eof
util.c:1229 ( cherokee_fd_close): fd=20 re=0
socket.c:0211 ( cherokee_socket_close): fd=20 is_tls=0 re=0
connection.c:0337 ( cherokee_connection_clean): conn 0x125fc50, has headers 0
As you see here: /home/dogomaps/net/htdocs/cgi-bin/mapserv
The /cgi-bin/mapserv is taken from the *normal* document root. Not the explicit
document root found in the handler configuration:
/home/dogomaps/net/cgi-bin/
Original comment by ste...@konink.de
on 28 Nov 2008 at 2:52
:-????. Works for me...
rule_list.c:0092 ( cherokee_rule_list_match): Trying rule prio=800
rule_request.c:0074 ( match): Request
"/cgi-bin/mapserv?map=/home/dogomaps/net/mapf
iles/hello.map&SERVICE=WMS&" didn't match with "/wms/(.*)$"
rule_list.c:0092 ( cherokee_rule_list_match): Trying rule prio=700
rule_list.c:0092 ( cherokee_rule_list_match): Trying rule prio=600
rule_directory.c:0097 ( match): Match! rule=/cgi-bin
req=/cgi-bin/mapserv web_directory=/cgi-bin: ret_ok
rule_list.c:0110 ( cherokee_rule_list_match): Merging rule prio=600
rule_list.c:0120 ( cherokee_rule_list_match): Final rule prio=600. Exiting.
connection.c:1937 (cherokee_connection_set_keepalive): Keep-alive denied
connection.c:2041 (cherokee_connection_open_request): web_directory='/cgi-bin'
request='/mapserv' local_directory='/home/aperez/cgi-bin'
handler_cgi_base.c:1066 (cherokee_handler_cgi_base_split_pathinfo): Pathinfo
'(null)'
handler_cgi_base.c:0729 (cherokee_handler_cgi_base_extract_path): Pathinfo:
'(null)'
handler_cgi_base.c:0732 (cherokee_handler_cgi_base_extract_path): Executable:
'/home/aperez/cgi-bin/mapserv'
handler_cgi.c:0489 ( manage_child_cgi_process): About to execute:
'/home/aperez/cgi-bin/mapserv'
handler_cgi.c:0494 ( manage_child_cgi_process): No Effective directory
handler_cgi.c:0669 ( fork_and_execute_cgi_unix): pid 8712
handler_cgi.c:0446 ( cherokee_handler_cgi_init): finishing ret_ok
handler_cgi.c:0090 ( read_from_cgi): read... ret=0 35
handler_cgi.c:0098 ( read_from_cgi): 35 bytes read
handler_cgi_base.c:0834 ( parse_header): CGI header:
'Content-type:
text/html
'
Anyway, I'm not sure if this patch is the better option to solve this issue...
Alvaro?.
Original comment by skar...@gmail.com
on 28 Nov 2008 at 7:22
It makes good sense for me. I'm applying it.
Thank you guys! :-)
Original comment by alobbs
on 28 Nov 2008 at 10:02
Oops! Nop.. my bad.
Antonio, it's your patch, so you are applying it.
Please, go ahead. Good job! :-)
Original comment by alobbs
on 28 Nov 2008 at 10:07
Thanks Alvaro! ;)
Fixed in r2504
Original comment by skar...@gmail.com
on 28 Nov 2008 at 12:56
Original comment by skar...@gmail.com
on 28 Nov 2008 at 12:57
Thank you all for looking into this issue! I will grab the latest changeset,
compile
it and test if my issue is fixed. I will set the status to verified once the fix
turns out positive!
Original comment by milovand...@gmail.com
on 28 Nov 2008 at 2:18
Tests turned out good.
The internal url /wms(.*)
with the rule /wms(.*)\?(.*)
/cgi-bin/mapserv?map=/path/to/maps/$1.map&Version=1.1.0&$2
routes correct!
Original comment by milovand...@gmail.com
on 28 Nov 2008 at 5:17
A new QA test covering this case should be added as well.
Original comment by alobbs
on 28 Nov 2008 at 5:57
skarcha, I still have no clue why it is working now, and yesterday it was still
broken.
Original comment by ste...@konink.de
on 28 Nov 2008 at 8:19
Original issue reported on code.google.com by
ste...@konink.de
on 24 Nov 2008 at 2:29