Code

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#5320 closed (duplicate)

request.path doesn't work properly under fastcgi

Reported by: julian Owned by: mtredinnick
Component: HTTP handling Version: master
Severity: Keywords: request path fastcgi
Cc: jumo@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by ubernostrum)

hi,

my django-app runs under www.domain.com/appl/ with fastcgi.

the output of "request.path" in a view called for ^$ is just "/" not "/appl/" as it should be...reproduce it:

urls.py:

from django.conf.urls.defaults import *
from appl.views import start

urlpatterns = patterns('',
	(r'^', start),
)

views.py:

from django.shortcuts import render_to_response

def start(request):
	return render_to_response('base.html',{'path':request.path})

base.html:

{{path}}

running with fastcgi under www.domain.com/appl/ returns:

/

but should

/appl/

I know this can be solved with a rewrite-rule in a .htaccess, but this shouldn't be the proper way to fix bugs.

Attachments (0)

Change History (3)

comment:1 Changed 7 years ago by ubernostrum

  • Description modified (diff)
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

(cleaning up formatting)

comment:2 Changed 7 years ago by ubernostrum

  • Resolution set to duplicate
  • Status changed from new to closed

Closing as a duplicate of #1516 because that's the underlying issue.

comment:3 Changed 7 years ago by julian

thanks for reformatting and applying all that changes.

maybe you can tell me: if the underlying issue has been known for so long, why isn't it solved yet?

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.