Opened 8 years ago

Closed 8 years ago

#27667 closed Bug (wontfix)

Check port number out of range for dev server url

Reported by: Ramin Farajpour Cami Owned by: nobody
Component: Core (Management commands) Version: 1.10
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

python manage.py runserver 127.0.0.1:100000
Trace :
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\django\utils\autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "C:\Python27\lib\site-packages\django\core\management\commands\runserver.py", line 144, in inner_run
    ipv6=self.use_ipv6, threading=threading)
  File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 183, in run
    httpd = httpd_cls(server_address, WSGIRequestHandler, ipv6=ipv6)
  File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 76, in __init__
    super(WSGIServer, self).__init__(*args, **kwargs)
  File "C:\Python27\lib\SocketServer.py", line 420, in __init__
    self.server_bind()
  File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 80, in server_bind
    super(WSGIServer, self).server_bind()
  File "C:\Python27\lib\wsgiref\simple_server.py", line 48, in server_bind
    HTTPServer.server_bind(self)
  File "C:\Python27\lib\BaseHTTPServer.py", line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "C:\Python27\lib\SocketServer.py", line 434, in server_bind
    self.socket.bind(self.server_address)
  File "C:\Python27\lib\socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
OverflowError: getsockaddrarg: port must be 0-65535.

Attachments (1)

port.diff (774 bytes ) - added by Ramin Farajpour Cami 8 years ago.

Download all attachments as: .zip

Change History (4)

by Ramin Farajpour Cami, 8 years ago

Attachment: port.diff added

comment:1 by Tim Graham, 8 years ago

I don't see much value in duplicating validation that Python already does. Do you have a use case?

comment:2 by Ramin Farajpour Cami, 8 years ago

No, just for the best solution

comment:3 by Tim Graham, 8 years ago

Resolution: wontfix
Status: newclosed

The proposed change seems less helpful since the user isn't informed of the valid port range.

Note: See TracTickets for help on using tickets.
Back to Top