Re: [Django] #30018: Regression for selenium tests & inaccurate Content-Length

2019-03-19 Thread Django
#30018: Regression for selenium tests & inaccurate Content-Length
--+
 Reporter:  Xavier Fernandez  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  HTTP handling |  Version:  2.1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Pascal Wichmann):

 * cc: Pascal Wichmann (added)


-- 
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/070.9b7b2079f37c5f9079b52b743e695be5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30018: Regression for selenium tests & inaccurate Content-Length

2018-12-12 Thread Django
#30018: Regression for selenium tests & inaccurate Content-Length
--+
 Reporter:  Xavier Fernandez  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  HTTP handling |  Version:  2.1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Carlton Gibson):

 * stage:  Unreviewed => Accepted


-- 
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/070.4361e5a9afd4d486d753bb558cd841bd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30018: Regression for selenium tests & inaccurate Content-Length

2018-12-12 Thread Django
#30018: Regression for selenium tests & inaccurate Content-Length
-+-
 Reporter:  Xavier Fernandez |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  HTTP handling|  Version:  2.1
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Carlton Gibson):

 * type:  Bug => Cleanup/optimization


Comment:

 Let's accept this on the "if it is easy to implement" basis. Otherwise we
 can `wontfix`.

-- 
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/070.a66671649d1e9601c299fd6e3df6632a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30018: Regression for selenium tests & inaccurate Content-Length

2018-12-08 Thread Django
#30018: Regression for selenium tests & inaccurate Content-Length
--+--
 Reporter:  Xavier Fernandez  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  HTTP handling |  Version:  2.1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--

Comment (by Florian Apolloner):

 I think this behavior is to be expected with keep-alive support. What we
 could do (if it is easy to implement) is to close the connection if we
 detect such a situation (Literally close the socket, not just a
 "Connection: close" header, because the client would still wait for the
 bytes to come).

-- 
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/070.daade9682822bc2af0581c84f5b10239%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30018: Regression for selenium tests & inaccurate Content-Length

2018-12-07 Thread Django
#30018: Regression for selenium tests & inaccurate Content-Length
--+--
 Reporter:  Xavier Fernandez  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  HTTP handling |  Version:  2.1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--

Comment (by Simon Charette):

 I'm fine with either resolutions as well but I'll let Florian chime in as
 he has a bit more context here.

-- 
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/070.71d472a69d8f1ab869ddee244db8b5c1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30018: Regression for selenium tests & inaccurate Content-Length

2018-12-07 Thread Django
#30018: Regression for selenium tests & inaccurate Content-Length
--+--
 Reporter:  Xavier Fernandez  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  HTTP handling |  Version:  2.1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--

Comment (by Xavier Fernandez):

 Hello Simon,
 > Wouldn't NGINX take care off adding Content-Lenght when dealing with X
 -Accel-Redirect?
 From my tests, it does and I've taken care of this issue by avoiding it: I
 removed this header from the response for GET requests (but kept it for
 HEAD requests).


 But indeed, the WSGI layer could maybe warn when seeing inconsistent
 responses.

 I'm also fine with closing this issue since it is clearly a very specific
 (and bad) case.

-- 
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/070.1fde1826c75351a3d0e708acf87e49cf%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30018: Regression for selenium tests & inaccurate Content-Length

2018-12-07 Thread Django
#30018: Regression for selenium tests & inaccurate Content-Length
--+--
 Reporter:  Xavier Fernandez  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  HTTP handling |  Version:  2.1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by Simon Charette):

 * cc: Florian Apolloner (added)
 * type:  Uncategorized => Bug
 * component:  Testing framework => HTTP handling


-- 
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/070.425ad81191f6f407279030da2b522805%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30018: Regression for selenium tests & inaccurate Content-Length

2018-12-07 Thread Django
#30018: Regression for selenium tests & inaccurate Content-Length
---+--
 Reporter:  Xavier Fernandez   |Owner:  nobody
 Type:  Uncategorized  |   Status:  new
Component:  Testing framework  |  Version:  2.1
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Simon Charette):

 Hello Xavier,

 Wouldn't NGINX take care off adding `Content-Lenght` when dealing with `X
 -Accel-Redirect`?

-- 
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/070.507fa40cd93bcc28994cb9c2c67f95ce%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #30018: Regression for selenium tests & inaccurate Content-Length

2018-12-07 Thread Django
#30018: Regression for selenium tests & inaccurate Content-Length
-+
   Reporter:  Xavier Fernandez   |  Owner:  nobody
   Type:  Uncategorized  | Status:  new
  Component:  Testing framework  |Version:  2.1
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+
 Not sure it qualifies as a bug/regression but:


 {{{
 diff --git a/tests/view_tests/tests/test_specials.py
 b/tests/view_tests/tests/test_specials.py
 index 70ffb1d23e..873e65a478 100644
 --- a/tests/view_tests/tests/test_specials.py
 +++ b/tests/view_tests/tests/test_specials.py
 @@ -1,4 +1,5 @@
  from django.test import SimpleTestCase, override_settings
 +from django.test.selenium import SeleniumTestCase


  @override_settings(ROOT_URLCONF='view_tests.generic_urls')
 @@ -21,3 +22,12 @@ class URLHandling(SimpleTestCase):
  """
  response = self.client.get('/permanent_nonascii_redirect/')
  self.assertRedirects(response, self.redirect_target,
 status_code=301)
 +
 +
 +@override_settings(ROOT_URLCONF='view_tests.urls')
 +class JSSeleniumTests(SeleniumTestCase):
 +
 +available_apps = ['view_tests']
 +
 +def test_wrong_length(self):
 +self.selenium.get(self.live_server_url + '/error_view/')
 diff --git a/tests/view_tests/urls.py b/tests/view_tests/urls.py
 index c487dd7cb9..974a59ff7c 100644
 --- a/tests/view_tests/urls.py
 +++ b/tests/view_tests/urls.py
 @@ -31,6 +31,9 @@ urlpatterns = [
  url(r'technical404/$', views.technical404, name="my404"),
  url(r'classbased404/$', views.Http404View.as_view()),

 +url(r'error_view/$', views.error_view),
 +url(r'wrong_length/$', views.wrong_length),
 +
  # i18n views
  url(r'^i18n/', include('django.conf.urls.i18n')),
  url(r'^jsi18n/$',
 i18n.JavaScriptCatalog.as_view(packages=['view_tests'])),
 diff --git a/tests/view_tests/views.py b/tests/view_tests/views.py
 index ce0079a355..fe0b397a00 100644
 --- a/tests/view_tests/views.py
 +++ b/tests/view_tests/views.py
 @@ -22,6 +22,16 @@ def index_page(request):
  return HttpResponse('Dummy page')


 +def wrong_length(request):
 +response = HttpResponse('')
 +response["Content-Length"] = 42
 +return response
 +
 +
 +def error_view(request):
 +return HttpResponse('')
 +
 +
  def with_parameter(request, parameter):
  return HttpResponse('ok')
 }}}

 did pass in 2.1.3 and now hangs on 2.1.4 due to
 
https://github.com/django/django/commit/e1721ece485b35ab5543f134203a8a8ce9f31a7c

 I acknowledge it might be a case of "Don't do that" but in my case,
 `wrong_length` also returns a `X-Accel-Redirect` header for nginx, hence
 the empty response with a non-null `Content-Length`.

-- 
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/055.b836b842cc0235541abc01f61de9f1f3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.