Re: [Django] #22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in the media folder

2015-06-01 Thread Django
#22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in 
the
media folder
-+-
 Reporter:  sHtev|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  File |  Version:  1.7
  uploads/storage|
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  staticfiles HEAD | Triage Stage:
  request HTTP   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * status:  new => closed
 * resolution:   => needsinfo


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.39b45a62c32ec13364a747e789eef482%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in the media folder

2015-05-31 Thread Django
#22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in 
the
media folder
-+-
 Reporter:  sHtev|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  File |  Version:  1.7
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:  staticfiles HEAD | Triage Stage:
  request HTTP   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by timgraham):

 Could you upload a sample project that can be used to reproduce the error?
 I tried with the stable/1.7.x branch using curl, but still get a 404 even
 on the first request.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.14cf4698a09a9933537b08159a5461ea%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in the media folder

2015-05-31 Thread Django
#22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in 
the
media folder
-+-
 Reporter:  sHtev|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  File |  Version:  1.7
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:  staticfiles HEAD | Triage Stage:
  request HTTP   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by jrief):

 * status:  closed => new
 * version:  1.5 => 1.7
 * resolution:  needsinfo =>


Comment:

 I also can replicate this bug. It happens on Django version 1.6 and 1.7. I
 haven't tested with 1.8 yet.

 In order to repeat you have to use any URL in the {{{/media/...}}} path
 **AND** the sessionid must be from a logged in staff user.

 {{{
 $ curl --head --cookie sessionid=
 http://localhost:8000/media/path-to-non-exiting-file
 HTTP/1.0 200 OK

 $ curl --include --cookie sessionid=
 http://localhost:8000/media/path-to-non-exiting-file
 HTTP/1.0 404 NOT FOUND

 $ curl --head --cookie sessionid=
 http://localhost:8000/media/path-to-non-exiting-file
 HTTP/1.0 404 NOT FOUND

 $ curl --head http://localhost:8000/media/path-to-non-exiting-file
 HTTP/1.0 404 NOT FOUND

 $ curl --head --cookie sessionid=
 http://localhost:8000/static/path-to-non-exiting-file
 HTTP/1.0 404 NOT FOUND
 }}}

 what we see here is, that only the first invocation of **curl** delivers
 an unexpected result. All others are correct.

 Of course this only happens with {{{DEBUG = True}}} and while delivering
 media files through Django. Otherwise we'd have to blame Apache or NGiNX.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.d2637ee958867c6f2b29bcc6be2b7709%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in the media folder

2014-06-28 Thread Django
#22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in 
the
media folder
-+-
 Reporter:  sHtev|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  File |  Version:  1.5
  uploads/storage|   Resolution:  needsinfo
 Severity:  Normal   | Triage Stage:
 Keywords:  staticfiles HEAD |  Unreviewed
  request HTTP   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by timo):

 * status:  new => closed
 * resolution:   => needsinfo


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.39cde6a052a42a2dd805c47a84af9027%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in the media folder

2014-06-26 Thread Django
#22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in 
the
media folder
-+-
 Reporter:  sHtev|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  File |  Version:  1.5
  uploads/storage|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  staticfiles HEAD |  Unreviewed
  request HTTP   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by timo):

 Attached is what I see on a GET in a browser.

 And with curl:
 {{{
 $ curl -i -X HEAD http://localhost:8000/media/foo

 HTTP/1.0 404 NOT FOUND
 Date: Thu, 26 Jun 2014 20:02:00 GMT
 Server: WSGIServer/0.1 Python/2.7.3
 X-Frame-Options: SAMEORIGIN
 Content-Type: text/html
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.e3dd10aaf83886397d2ab57e05009369%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in the media folder

2014-06-26 Thread Django
#22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in 
the
media folder
-+-
 Reporter:  sHtev|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  File |  Version:  1.5
  uploads/storage|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  staticfiles HEAD |  Unreviewed
  request HTTP   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by aaugustin):

 I suspect Steve's seeing the yellow debug view.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.d0fe4d7269d656e5ccdd8f1da0208ba0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in the media folder

2014-06-26 Thread Django
#22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in 
the
media folder
-+-
 Reporter:  sHtev|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  File |  Version:  1.5
  uploads/storage|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  staticfiles HEAD |  Unreviewed
  request HTTP   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by timo):

 What do you mean by "the standard text reply"? What view is returning the
 response?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.8cb8f1279cef4961c43da9391ffa3033%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in the media folder

2014-06-26 Thread Django
#22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in 
the
media folder
-+-
 Reporter:  sHtev|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  File |  Version:  1.5
  uploads/storage|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  staticfiles HEAD |  Unreviewed
  request HTTP   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by Steve Gilroy ):

 I realised the problem is that when DEBUG=True is in settings, I am
 getting a 200, and the content is the standard text reply, rather than a
 proper 404.

 Should this still apply to the media directory though?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.be751e5ffb84a6aac3db452ce3435105%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in the media folder

2014-06-26 Thread Django
#22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in 
the
media folder
-+-
 Reporter:  sHtev|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  File |  Version:  1.5
  uploads/storage|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  staticfiles HEAD |  Unreviewed
  request HTTP   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by Steve Gilroy ):

 and I get the 200 with curl as well as Javascript

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.865cc91b6ab58483066523467d3c43c7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in the media folder

2014-06-26 Thread Django
#22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in 
the
media folder
-+-
 Reporter:  sHtev|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  File |  Version:  1.5
  uploads/storage|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  staticfiles HEAD |  Unreviewed
  request HTTP   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by Steve Gilroy ):

 I have tested this with
 STATICFILES_STORAGE='django.contrib.staticfiles.storage.StaticFilesStorage'
 and still see the same issue

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.6bfee8de6509e7dc9c661d18e72f4ed1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in the media folder

2014-06-26 Thread Django
#22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in 
the
media folder
-+-
 Reporter:  sHtev|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  File |  Version:  1.5
  uploads/storage|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  staticfiles HEAD |  Unreviewed
  request HTTP   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by Steve Gilroy ):

 media folder is set up as

 STATICFILES_STORAGE = 'require.storage.OptimizedStaticFilesStorage'
 CHECKOUT_ROOT = os.path.abspath(os.path.join(PROJECT_ROOT, '..'))
 MEDIA_URL = '/media/'
 MEDIA_ROOT = os.path.join(CHECKOUT_ROOT, 'var', 'media')

 this could imply an issue with django-require

 Django version is 1.5.8

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.53902ed4e6cbc693ba25f5c505879629%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in the media folder

2014-06-25 Thread Django
#22904: Django returns an HTTP 200 on a HEAD request for a non-existing file in 
the
media folder
-+-
 Reporter:  sHtev|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  File |  Version:  1.5
  uploads/storage|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  staticfiles HEAD |  Unreviewed
  request HTTP   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by timo):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 I can't reproduce this. How are you serving content in the media folder? I
 tested using [https://docs.djangoproject.com/en/1.6/howto/static-files
 /#serving-files-uploaded-by-a-user-during-development static()] and saw
 the following in the development server logs:

 `[25/Jun/2014 13:56:21] "HEAD /media/foo HTTP/1.1" 404 0`

 after running:

 `$ curl -i -X HEAD http://localhost:8000/media/foo`

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.fe9c2fa4bf58f1b3bd31d7dd830db742%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.