Giter Site home page Giter Site logo

Comments (2)

cdent avatar cdent commented on September 6, 2024

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.

akrherz avatar akrherz commented on September 6, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.