Comments (2)
Hmmm. Good question. This section of the code is from long before I was involved so it hard to guess the reasoning.
Are you changing the query string in the middleware, or simply doing other things in reaction to what is already there?
If if is the later, would it work to delete paste.parsed_formvars
at the end of the middleware (after parse_formvars
is called) so that the second time it is called, there's no cached state?
Another option might be to do a method check in the middleware and if it is a GET
then don't use parse_formvars
at all, just parse_querystring
. (I'm assuming here that you're not using a body in the GET request...)
from paste.
Thank you for the response.
Are you changing the query string in the middleware, or simply doing other things in reaction to what is already there?
I'm just doing middleware stuff, like looking for naughty content and doing some conditioning to remove downstream boilerplate code.
If if is the later, would it work to delete paste.parsed_formvars at the end of the middleware (after parse_formvars is called) so that the second time it is called, there's no cached state?
That's a clever idea thanks.
I still think this is a bug though and that reprocessing should be removed :) I'll PR it now.
from paste.
Related Issues (20)
- `PKG-INFO` in sdist is missing `License-File` HOT 3
- threading.Thread.isAlive is removed in Python 3.9 HOT 1
- base64.encodestring deprecation warning HOT 2
- gzip middleware adds a HTTP body when it shouldn't (e.g., HEAD requests) HOT 2
- add ipv6 support HOT 5
- translogger can fail if locale month is non ascii HOT 1
- Question. What's the licence of paste? HOT 2
- ImportError with setuptools 50.1.0 HOT 1
- Can't change TransLogger format HOT 4
- the imp module is deprecated HOT 1
- 3.5.0: pytest warnings HOT 5
- 3.5.0: sphinx warnings HOT 5
- Missing license file in the wheel HOT 2
- Test failure with Python 3.11 HOT 2
- UnicodeDecodeError on German Date with Umlaut (ex. Mรคrz)
- Replace deprecated imp module with importlib HOT 1
- cgi and cgitb packages are deprecated and will be removed in Python 3.13 HOT 3
- RFE: is it possible to start making github releases?๐ค HOT 6
- 3.10.0: Testing fails with some other Python module installed HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paste.