Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apple-mobile-lte web page not working #24

Open
malhal opened this issue Oct 17, 2016 · 0 comments
Open

apple-mobile-lte web page not working #24

malhal opened this issue Oct 17, 2016 · 0 comments

Comments

@malhal
Copy link

malhal commented Oct 17, 2016

Console output:

Querying 505:1:12288:135943937
Internal Server Error: /apple-mobile-lte/505:1:12288:135943937
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/mh/Development/Github/iSniff-GPS/iSniff_GPS/views.py", line 176, in AppleMobile
    (celldict,celldesc) = wloc.QueryMobile(cellid,LTE)
  File "/Users/mh/Development/Github/iSniff-GPS/iSniff_GPS/wloc.py", line 140, in QueryMobile
    r = requests.post('https://gs-loc.apple.com/clls/wloc',headers=headers,data=data,verify=False) #the remote SSL cert CN on this server doesn't match hostname anymore
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/api.py", line 110, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/api.py", line 56, in request
    return session.request(method=method, url=url, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 461, in request
    prep = self.prepare_request(req)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 394, in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/models.py", line 295, in prepare
    self.prepare_headers(headers)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/models.py", line 409, in prepare_headers
    check_header_validity(header)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/utils.py", line 797, in check_header_validity
    raise InvalidHeader("Invalid return character or leading space in header: %s" % name)
InvalidHeader: Invalid return character or leading space in header: Accept-Encoding:
[17/Oct/2016 17:59:45] "GET /apple-mobile-lte/505:1:12288:135943937 HTTP/1.1" 500 95269

Browser displays:

InvalidHeader at /apple-mobile-lte/505:1:12288:135943937
Invalid return character or leading space in header: Accept-Encoding:
Request Method: GET
Request URL:    http://127.0.0.1:8000/apple-mobile-lte/505:1:12288:135943937
Django Version: 1.7.1
Exception Type: InvalidHeader
Exception Value:    
Invalid return character or leading space in header: Accept-Encoding:
Exception Location: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/utils.py in check_header_validity, line 797
Python Executable:  /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Python Version: 2.7.12
Python Path:    
['/Users/mh/Development/Github/iSniff-GPS',
 '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
 '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
 '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
 '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
 '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
 '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
 '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
 '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
 '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages']
Server time:    Mon, 17 Oct 2016 17:59:45 -0500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant