Twisted Web provides a simple, stable HTTP server built on top of Twisted framework. It is suitable for all types of web apps and web services. It provides a flexible resource publishing API, and implements HTTP 1.0 with some 1.1 features. It can also be used for hosting WSGI applications.
Questions tagged [twisted.web]
199 questions
1
vote
0 answers
sessions with twisted.web
I want to store a instance of ldap connection in a session var. I use request.getSession() but don't work correctly. My code:
session = request.getSession()
connect =…

Manu Mora
- 332
- 1
- 2
- 13
1
vote
1 answer
Unhandled error in Deferred in twisted deferToThread
I have client/server code example from twisted. Now, my requirement is that when a call is made to server from the client - the server defers the call to a thread, who actually replies back to the client and the server can do something else. In…

yguw
- 856
- 6
- 12
- 32
1
vote
2 answers
How to set subprotocol list for Client (Twisted)
Hey everyone,
I have created a Client and a Server to communicate over websockets. The Twisted library is used for the websockets, and eventually I will be sending GraphQL strings from Client to Server.
However, I am getting an error that…

Brian
- 421
- 3
- 20
1
vote
1 answer
Twisted html File listing gives "Request did not return bytes" error
I have a Twisted web application. I want to call a Html file for a GET request.(my Html file is in the same folder where my Twisted app runs)
class Root(resource.Resource):
isLeaf = False
def render_GET(self, request):
…

Ratha
- 9,434
- 17
- 85
- 163
1
vote
0 answers
Getting time to first byte (TTFB) in twisted and scrapy
I'm trying to get time to first byte (TTFB) in scrapy. I know that there is a download_latency property in meta but it includes download time as I understand.
Download_latency is calculated in addCallback function here:…

Anatoly Seregin
- 21
- 1
1
vote
1 answer
How to access Autobahn WebSocketResource from Twisted Root Resource?
I have been searching for many examples to demonstrate how to access a Autobahn Twisted WebSocketResource , but can't seem to find examples that show this.
I understand from this example Autobahn Twisted WebSocketResource example that you…

Brian
- 421
- 3
- 20
1
vote
2 answers
How to Upgrade HTTP Request to Websocket (Autobahn & Twisted Web )
To give you an idea of what I am trying to accomplish with Twisted Web and Autobahn websockets: my UI currently sends an initial HTTP GET request with an upgrade to a websocket in the header. Upon reading that in Twisted Web, the connection needs to…

Brian
- 421
- 3
- 20
1
vote
1 answer
Twisted Web serving Django project
I have fresh Django project without any application just the defaults (e.g. admin)
My plan is to have video chat and instant messaging within my Django project.
wsgi.py
import os, sys
from django.core.wsgi import…

Greatxam Darthart
- 158
- 1
- 15
1
vote
1 answer
Override all default resources / responses from Twisted.web
For a super-basic http twisted front-end.
How can I make sure no html is ever written back unless I tell it to.
So, I have my /zoo url below.
For any tracebacks, or 'No Such Resource' responses, I want to just drop the connection or return an empty…

Dav
- 13
- 3
1
vote
0 answers
Twisted Web: problems encoding unicode
This is probably a stupid question/problem, but i could not find an answer for it. Also, it may not realy be twisted specific.
I am trying to write a resource for a twisted.web webserver, which should serve a page containing non-ascii…

bennr01
- 31
- 6
1
vote
1 answer
Python twisted putChild not forwarding expectedly
Code here.
from twisted.web.static import File
from twisted.web.server import Site
from twisted.web.resource import Resource
from twisted.internet import ssl, reactor
from twisted.python.modules import getModule
import secure_aes
import…

Luke
- 439
- 1
- 12
- 26
1
vote
1 answer
Twisted server returning text with unexpected fonts
My current twisted server code. It is a simple experiment to take url encoded requests and convert them into a JSON like string to then return.
from twisted.web.server import Site
from twisted.web.resource import Resource
from twisted.internet…

Luke
- 439
- 1
- 12
- 26
1
vote
0 answers
Twisted: static URL dispatch 'No Such Resource' error
I'm learning to use twisted.web from web-in-60-seconds . In the section Static URL Dispatch (link here), I ran the code as it is, and when I connect to localhost at port 8880 it displays 'No Such Response' error. Here's the code.
from…

Airbear
- 361
- 3
- 9
1
vote
1 answer
Twisted HTTP Proxy Channel set to None on LostConnection but loseConnection hasn't been called yet
Ok I have been writing a proxy to take http GET requests and translate them into HTTP POST requests (because a lot of media players for python only support GET). So I know am working on caching those results that way I only download a url once, I…

Zimm3r
- 3,369
- 5
- 35
- 53
1
vote
0 answers
Build protocol mechanism in twisted Site
I am trying to understand how and when the protocols are created for http requests in Site factory. Though I have a basic understanding of working of factory and protocols,My confusion arises because I see multiple protocols are created for single…

Learner
- 157
- 3
- 15