to a wider audience.
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman/options/web-sig/archive%40mail
environments plug into
by initializing the object with an environment
dictionary, a file to read the user data from
(for posts and whatnot), and then a write
function that gives direct control to returning
the request output to the user.
Congratulations, you just reinvented WSGI. ;)
Robert Brewer
.
Sort of an async-to-threaded bridge. I would think, even if you chose
not to build that into your WSGI wrapper, that it would be generic
enough to be quite useful for any async server + threaded app. I'll
refrain from any predictions about performance, however... ;)
Robert Brewer
System Architect
their primary value lies in their Pythonic API, then a common
proxy interface will be perceived as reducing their value. All of which
is to say, there's as much of a social issue to solve here as there is a
technical issue.
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED
mounted at
root so SCRIPT_NAME can always be . I haven't adopted this
interpretation, because in my mind, middleware isn't mounted
anywhere--it's a filter for the end app(s).
So which one is the correct interpretation, 1 or 2?
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED
, etc.
There are simply too many variables involved in building a WSGI handler
appropriate for your environment; trying to do that by subclassing
wsgiref.handlers.* results in extremely complicated and slow code.
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED
Alan Kennedy wrote:
[Robert Brewer]
Look at the right code and see if your gut feeling changes. ;)
I looked at
http://svn.cherrypy.org/trunk/cherrypy/_cphttpserver.py
As indicated by Ian in this message
http://mail.python.org/pipermail/web-sig/2006-February/002074.html
Sorry
is educating users: not every *exception* is an
*error*.
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman
code('utf-8'))
f.close()
1. Have you examined the response headers on a request for Japanese content and verified that the response is encoded in UTF-8?
2. Why decode it just to turn around and encode it again with the same encoding?
Robert Brewer
System Architect
Amor Mini
-10-299287.html You'll also
probably want to use ReadBinary to handle non-text files.
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe
wsgiref.simpleserver and most other WSGI servers in the wild.
Shouldn't the spec define this explicitly?
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
by that?
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com
Title: RE: [Web-SIG] WSGI and long response header values
Phillip J. Eby wrote:
Robert Brewer wrote:
So in my reading of HTTP, some code somewhere should introduce newlines in
longish, encoded response header values. I see three options:
1. Keep things as they are and disallow
Title: RE: [Web-SIG] WSGI and long response header values
James Y Knight wrote:
On Sep 8, 2006, at 7:22 PM, Robert Brewer wrote:
Bah. I knew I forgot a constraint in there (the strings
have to be encoded by the app). Personally, I think the
separate-by-spaces cure is worse than
-encoding is broken from the get-go.
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman/options/web-sig
for that item?
I'm currently saying they must put in a list/tuple or dict.
I would've thought they'd just leave out the entry altogether.
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http
expect various dispatchers can
never produce either args or kwargs, then why not go with a pair of
independent entries: wsgi.dispatch_args and wsgi.dispatch_kwargs? That
would make the omission of one or the other much more natural for both
the sender and receiver.
Robert Brewer
System Architect
Amor
item per app:
throw_errors = True
...I now have to present the deployer with a more-confusing and more
tightly-coupled option:
ignore_wsgiorg_throw_errors = True
If both the protocol and my app's API are now more complicated, what
have we gained?
Robert Brewer
System Architect
Amor
pretty bad. What can I do to speed up this process?
Write a change proposal for the WSGI spec?
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
).
If you use mod_python (3.1 or better) instead of proxy/rewrite, you can inspect
apache.mpm_query(apache.AP_MPMQ_IS_THREADED) and
apache.mpm_query(apache.AP_MPMQ_IS_FORKED) as
http://projects.amor.org/misc/wiki/ModPythonGateway does.
Robert Brewer
System Architect
Amor Ministries
[EMAIL
. But as you've noticed, that doesn't mean
it's easy. ;)
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman
SCRIPT_NAME (and telling its users it was limited in that way).
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org
. The
jacuzzi's open, too, if you brought trunks. Feel free to drop by anytime; but
call me first: 619 846-5585 (they lock everything around here). I'm here 'til
Monday morning.
Robert Brewer
CherryPy Team
___
Web-SIG mailing list
Web-SIG@python.org
, and deploy single-framework sites.
In short, I'm pushing for:
read conf - apply conf - del conf - work with objects
as opposed to the much more tightly-coupled and hard-to-use:
read conf - work with a mix of conf and objects forever
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED
by a good Web Site Engine Interface spec.
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman/options/web
of a chunked
transfer encoding header. Not sure if this is
actually a bug or not.
It looks like a bug. The Expect header should be
checked before decode_chunked (at least until the
100 response can be moved inside read()).
Thanks for catching those!
Robert Brewer
System Architect
Amor Ministries
[EMAIL
of which seemed as appealing
as zdaemon for various reasons.
and Robert Brewer replied:
The user interface isn't Python-specific, but the interaction with
WSGI servers, middleware, applications, and frameworks should be.
and Jim answered:
I don't think we are talking about the same thing
each time its underlying
application yields a value. If the middleware cannot yield
any other value, it must yield an empty string.
I suspect rewriting the example to conform to PEP 333 will make this proposal
much more complex?
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED
Jim Fulton wrote:
On Mar 5, 2007, at 1:38 PM, Robert Brewer wrote:
...where the pywebd module:
1. Composes the WSGI stack (provides a library to do so at least),
2. Notifies frameworks of site-wide events (like start,
stop, restart
and graceful),
3. Provides plugins
://www.cherrypy.org/wiki/WSGI for example, which shows all of the
places you can connect foreign WSGI components with CherryPy WSGI
components.
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
___
Web-SIG mailing list
Web-SIG@python.org
Web
, I
would expect a command-line arg or config entry which controlled whether
or not to plug in the autoreloader. Finally, when deploying from
CherryPy itself, it plugs in (and configures) the autoreloader based on
the existing CherryPy config semantics.
Robert Brewer
System Architect
Amor Ministries
Jeff Shell wrote:
On 3/7/07, Robert Brewer [EMAIL PROTECTED] wrote:
Jeff Shell wrote:
Configuration and deployment?
I'm trying to understand the scope of these terms (or
this combined
term) better. I take it 'configuration' means just how an
'app' might
publish itself
consider itself to be like an HTTP
gateway server, with the application being an
HTTP origin server. (See RFC 2616, section 1.3,
for the definition of these terms.)
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
___
Web-SIG
, is there a better name for the
spec effort than WSPB?
I have lots of other questions, but I'll let you all ask them.
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
[1]
http://www.aminus.org/blogs/index.php/fumanchu/2007/06/24/web_site_proce
ss_bus
Phillip J. Eby wrote:
At 10:57 AM 6/25/2007 -0700, Robert Brewer wrote:
This should be a collaborative effort, and I'm very open to
discussion at all levels of detail. Even if this flies at the highest
conceptual level, there are still several things I know of
we would need to nail down
Phillip J. Eby wrote:
At 01:51 PM 6/25/2007 -0700, Robert Brewer wrote:
Seriously, though, this handles the notification but not the state
machine, which I think is critical to the effort. It also
doesn't do any
error-handling for misbehaving subscribers, so not all
subscribers
.
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com
deployers who aren't familiar with Apache to get their site up
and running faster. However, mod_wsgi can still use Apache directives
for attaching/detaching the listeners if it likes, providing a more
Apache-like look-and-feel.
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED
Phillip J. Eby wrote:
At 02:17 PM 6/25/2007 -0700, Robert Brewer wrote:
Phillip J. Eby wrote:
At 01:51 PM 6/25/2007 -0700, Robert Brewer wrote:
For example, if an error occurs, isn't that an indication that the
component is broken? Masking the failure just makes it
less likely
for WSPBus. Note that
IReactorCore.stop raises an error if not core.running, too.
I'll also note in passing that Twisted during and after triggers log
on error but don't crash...
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
___
Web-SIG
that every application provide its resource-
releasing endpoint via some means other than a successful
response. I'm sure you all can come up with other solutions.
Robert Brewer
[EMAIL PROTECTED]
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http
Phillip J. Eby wrote:
At 11:45 PM 8/24/2007 -0700, Robert Brewer wrote:
However, and here's the rub, if nextapp() raises an
exception, **self.response is never bound**, and
therefore we have no handle to the object we need
to close. Note that this is not a middleware-only
problem; servers
.
Robert Brewer
[EMAIL PROTECTED]
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com
Graham Dumpleton wrote:
On 27/11/2007, Robert Brewer [EMAIL PROTECTED] wrote:
Chris Withers wrote:
Right, I'm curious as to how wsgi applications end up being
multi-threaded or multi-process and if they are, how they share
resources such as databases and configuration.
There's
Chris Withers wrote:
Robert Brewer wrote:
Apache will interfere, and try to re-apply the range to whatever you
emit. The only solution we've found so far is to tell the app to
ignore
any 'Range' request header when running behind Apache, and just let
Apache have its way. See http
the benefit? I only see a con:
every piece of middleware that cares has to repeat the decoding of
PATH_INFO and SCRIPT_NAME, wasting CPU and memory.
Robert Brewer wrote:
I changed CP's wsgiserver to do decoding that very day.
So I think the answer is yes.
IMHO yes is the wrong answer
Why?
I am
Luis Bruno wrote:
Robert Brewer wrote:
IMHO [changing CP's wsgiserver to do decoding] is the wrong answer
Why?
Because then I'm stuck monkey patching every WSGI server (and/or stuck
using my own URL dispatcher) so that I don't lose the information that
one of the forward slashes
.
Robert Brewer
[EMAIL PROTECTED]
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com
libraries, servers, or frameworks (or
their friends; don't let domain boundaries stop you ;).
Robert Brewer
[EMAIL PROTECTED]
619 374 1117
[1]
http://www.marriott.com/hotels/travel/chibr-renaissance-chicago-ohare-su
ites-hotel/
___
Web-SIG mailing list
Web
as a
string for example, because the other end is probably going to parse
JSON numbers as doubles.
Thanks for allowing that; the last 3 JSON projects I've been involved
with have had Python on both ends, and always passed Decimal, never
floating-point.
Robert Brewer
[EMAIL PROTECTED
/decoding must be handled by the application, so we made the CP
WSGI server pass 2047-encoded request headers through unmodified.
FYI, there's been a lot of talk lately on the http-bis WG about using
some mechanism other than RFC 2047 in the future.
Robert Brewer
[EMAIL PROTECTED]
[1]
http
() to choose would be even
better.
Robert Brewer
[EMAIL PROTECTED]
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com
John Millikin wrote:
On Sat, Apr 5, 2008 at 7:01 PM, Robert Brewer [EMAIL PROTECTED] wrote:
Re: Representation of Fractional Numbers, there are two solutions. If you
return decimals, people using JS on the other end are going to call
float(d).
If you return floats, people not using JS
with
application state, but it makes for a good transition strategy from
existing RPC mechanisms.
Robert Brewer
[EMAIL PROTECTED]
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http
, cherrypy.serving _is_ a threadlocal object. But I don't imagine it
would be difficult for a non-threaded HTTP server to replace
cherrypy.serving with some other-context-local if they liked.
Robert Brewer
[EMAIL PROTECTED]
___
Web-SIG mailing list
Web-SIG@python.org
Matt Goodall wrote:
Yes, it can be tedious but I believe explicit arg passing
is necessary to make code readable, testable and reusable.
...
I've made the mistake of relying on magic contexts in the
past. I'm still trying to fix things.
Can you elaborate?
Robert Brewer
[EMAIL PROTECTED
to implement request-local storage by using the
environ, it would call set_local_implementation with an imp function
that closes over the environ for each request.
And what package does requestlocal.py live in?
Robert Brewer
[EMAIL PROTECTED]
___
Web
to store the server name.
import socket
self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY,
1)
HTTPServer.server_bind(self)
self.setup_environ()
Robert Brewer
[EMAIL PROTECTED]
[1] http://en.wikipedia.org/wiki/Nagle's_algorithm
A tcpdump would be more helpful at this point, but I'm not sure the ML
is the right place for that.
Robert Brewer
[EMAIL PROTECTED]
-Original Message-
From: [EMAIL PROTECTED] [mailto:web-sig-
[EMAIL PROTECTED] On Behalf Of Tibor Arpas
Sent: Tuesday, July 22, 2008 8:51 AM
To: Jean
it in the request body with
POST. If you have further questions, you should ask at comp.lang.python:
http://mail.python.org/mailman/listinfo/python-list
Robert Brewer
[EMAIL PROTECTED]
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs
+1
-Original Message-
From: [EMAIL PROTECTED] [mailto:web-sig-
[EMAIL PROTECTED] On Behalf Of Ian Bicking
Sent: Sunday, November 16, 2008 10:06 AM
To: Graham Dumpleton
Cc: Web SIG
Subject: Re: [Web-SIG] Revising environ['wsgi.input'].readline in the
WSGI specification
Graham
not complicate this change by
conflating it with others yet again.
Robert Brewer
[EMAIL PROTECTED]
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman/options/web-sig/archive
. But i would like to identify
(and
reproduce) exactly the problem.
I also use a lot of cached data in my app. Anyway i have to make it
thread-safe...
shameless-plug
Try http://www.aminus.net/wiki/PyConquer to help identify the problem.
/shameless-plug
Robert Brewer
fuman...@aminus.org
WSGI support. Mostly non-existent. Fix it? Fork it?
Drop it?
* Lifecycle methods (start/stop/etc event API driven by the container)
* Remove app_iter.close?
Robert Brewer
fuman...@aminus.org
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http
I wrote:
We had a good second meeting and answered more issues. My
understanding
is that there is another BoF scheduled for tomorrow (Sunday). Check
the
Open Space board for details.
My mistake. I'll put up an Open Space reservation for 5pm today ASAP.
Robert Brewer
fuman...@aminus.org
)
* Lifecycle methods (start/stop/etc event API driven by the container)
Robert Brewer
fuman...@aminus.org
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman/options/web-sig/archive
a patch to make it handle bytes for fp/environ but that
became difficult quickly and may complicate the cgi module needlessly if
we can instead use unicode for those 3 environ entries. I'll report back
here.
Robert Brewer
fuman...@aminus.org
___
Web
Graham Dumpleton wrote:
2009/4/2 Guido van Rossum gu...@python.org:
On Wed, Apr 1, 2009 at 12:15 PM, Ian Bicking i...@colorstudy.com
wrote:
On Wed, Apr 1, 2009 at 11:34 AM, Guido van Rossum gu...@python.org
wrote:
On Wed, Apr 1, 2009 at 5:18 AM, Robert Brewer fuman...@aminus.org
wrote
that tries to.
http://www.cherrypy.org/browser/trunk/cherrypy/lib/http.py#L196
Currently, CP apps call that. We can move that to the server if desired.
Robert Brewer
fuman...@aminus.org
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http
Graham Dumpleton wrote:
2009/4/2 Robert Brewer fuman...@aminus.org:
Alan Kennedy wrote:
Hi Graham,
I think yours is a good solution to the problem.
[Graham]
In other words, leave all the existing CGI variables to come
through
as latin-1 decode
As latin-1 or rfc-2047 decoded
to what was always a
shaky spec.
Robert Brewer
fuman...@aminus.org
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com
be absoluteURI or relativeURI,
neither of which have defined encodings. RFC 2047 only applies to
headers of type TEXT, of which there are surprisingly few.
Robert Brewer
fuman...@aminus.org
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http
/TEXT).
Robert Brewer
fuman...@aminus.org
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com
far
outnumber origin servers).
Robert Brewer
fuman...@aminus.org
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com
, Graham, and is what I'll be implementing in my
python3 branch for CherryPy barring any unforeseen impediments.
Robert Brewer
fuman...@aminus.org
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http
CONTENT_LENGTH?
Sure; I think that's reasonable. It's supposed to be 'file-like'.
Robert Brewer
fuman...@aminus.org
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman/options/web
P.J. Eby wrote:
At 08:07 AM 5/8/2009 -0700, Robert Brewer wrote:
I decided that that single type should be byte strings because I want
WSGI middleware and applications to be able to choose what encoding
their output is. Passing unicode to the server would require some
out-of-band method
Graham Dumpleton wrote:
2009/5/12 Robert Brewer fuman...@aminus.org:
There's a major change in functionality in the cgi module between
Python
2 and Python 3 which I've just run across: the behavior of
FieldStorage.read_multi, specifically when an HTTP app accepts a file
upload within
:
# Closing the conn is the only way to determine len.
self.close_connection = True
Robert Brewer
fuman...@aminus.org
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman
numbers of WSGI middleware aren't fighting this; it would mean
decoding the same environ entries every time you switched middleware providers.
Some of you said as much at PyCon:
http://mail.python.org/pipermail/web-sig/2009-March/003701.html
Robert Brewer
fuman...@aminus.org
and not characters. Falling back to ISO-8859-1 (and minting a new WSGI
environ entry to declare the charset which was used to decode) can handle all
of these cases. Server configuration options cannot, at least not without their
specification becoming unwieldy.
Robert Brewer
fuman...@aminus.org
[1] http
.
Did I say 3 reasons? I meant 4: Accept-Charset.
Robert Brewer
fuman...@aminus.org
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman/options/web-sig/archive%40mail
Armin Ronacher wrote:
Thanks to Graham Dumpleton and Robert Brewer there is some serious
progress on WSGI currently. I proposed a roadmap with some PEP
changes
now that need some input.
Summary:
WSGI 1.0 stays the same as PEP 0333 currently is
WSGI 1.1 becomes what Ian
that
there is no WSGI 1.X for Python 3.X at all?
I want something in between so I don't have to wait months or years for
WSGI 2. I want to ship a version of CherryPy with Python 3 support last
week.
Robert Brewer
fuman...@aminus.org
___
Web-SIG
cgi.FieldStorage?
urllib.unquote, for one. We had to make a version which accepts bytes
(and outputs bytes). But it's only 8 lines of code.
Robert Brewer
fuman...@aminus.org
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
that API be expressed?
Perhaps not, but I wrote unquote_bytes at PyCon 2009, after discussing
urllib in the python-dev room and being told no bytes-compatible version
was desired in the stdlib. So *some* thought has gone into it.
Robert Brewer
fuman...@aminus.org
René Dudfield wrote:
On Mon, Sep 21, 2009 at 6:05 PM, Robert Brewer fuman...@aminus.org
wrote:
Armin Ronacher wrote:
WSGI will demand UTF-8 URLs and only
provide iso-XXX support for backwards compatibility.
WSGI cannot demand that; a recommendation for utf-8 in a few draft
P.J. Eby wrote:
At 11:23 AM 9/21/2009 -0700, Robert Brewer wrote:
I still don't see why the environ should have multiple versions of
anything. It's not as if the HTTP request gives us multiple
Request-URI's. There's a single processing step that has to happen
somewhere: decoding the bytes
line * number of middlewares in the WSGI
stack * each request). With wsgi.uri_encoding you get either (1 line * 1
middleware designed to transcode * each request), or even 0 if your
whole site uses just one charset.
Robert Brewer
fuman...@aminus.org
Henry Precheur wrote:
On Mon, Sep 21, 2009 at 03:26:35PM -0700, Robert Brewer wrote:
It looks simpler until you have a site that is not primarily utf-8.
In that case, you multiply your (1 line * number of middlewares in
the
WSGI
stack * each request).
With wsgi.uri_encoding you get
P.J. Eby [mailto:p...@telecommunity.com]
At 07:40 PM 9/21/2009 -0700, Robert Brewer wrote:
Yes; you have to transcode to the correct encoding. Once.
Then every other WSGI application interface below that one
doesn't have to care.
You can only do that if you *break encapsulation*, which
want them, then
just stuff your new class into the sessions module via
cherrypy.lib.sessions.MyFileSession = MyFileSession (and the config
system will automatically pick it up).
Robert Brewer
fuman...@aminus.org
___
Web-SIG mailing list
Web-SIG@python.org
taste.
Robert Brewer
fuman...@aminus.org
[1] http://www.cs.utexas.edu/~wcook/Drafts/2009/essay.pdf
[2]
http://www.cherrypy.org/wiki/ZenOfCherryPy#a8.Subclassedbuiltinsarebette
rthancustomtypes.
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http
notice). If you do that, we can write a WSGI for Python 3 now
that doesn't suffer from any of the complexities of 2to3.
Robert Brewer
fuman...@aminus.org
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe
by the HTTP request and all the attendant encoding-
guessing (or configuration) it implies. Just some field experience:
that's not hard. CherryPy 3.2 does this now between various WSGI
proposals.
Robert Brewer
fuman...@aminus.org
___
Web-SIG mailing
?
I've run a few businesses now on WSGI without doing what you describe, so I
don't see why blocking makes an application 'trivial'.
Robert Brewer
fuman...@aminus.org
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web
differentiating HEAD from GET, or whether servers should transform HEAD
to GET before invoking the first application callable. I'd personally
prefer the former.
Robert Brewer
fuman...@aminus.org
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http
. In practice, that means allowing servers to
close the connection without reading the entire request body if a certain
number of bytes is exceeded.
Robert Brewer
fuman...@aminus.org
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http
Benoit Chesneau wrote:
On Wed, Sep 22, 2010 at 5:34 PM, Robert Brewer fuman...@aminus.org
wrote:
However, the caveat requires a caveat: servers must still be able to
protect themselves from malicious clients. In practice, that means
allowing servers to close the connection without reading
and
replaced them with hooks and tools in version 3. You might find more insight
by studying the latest cherrypy/_cptools.py
Robert Brewer
fuman...@aminus.org
___
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe
1 - 100 of 102 matches
Mail list logo