Giter VIP home page Giter VIP logo

Comments (3)

tmenier avatar tmenier commented on August 28, 2024

Great catch. It turns out that the method I used to decode the URL has a glitch specific to the + character that has been blogged about by Rick Strahl and others. I will provide an update soon, most likely going with Rick's method. Thanks for reporting.

from flurl.

tmenier avatar tmenier commented on August 28, 2024

This is fixed almost to your liking.

  1. When parsing a query string, Flurl now interprets + as a space.
  2. When encoding a query string, Flurl by default encodes spaces as %20, but Url.ToString now optionally takes an encodeSpaceAsPlus argument so you can control it.

The only thing you don't get here is preserving the original intent, i.e. if it goes in as a + it should come out as a +. Flurl stores unencoded values and encodes as needed, and re-architecting it to remember the original encoding seemed like a large effort without much benefit. Servers will be perfectly happy with %20 if you're making HTTP calls, and if you want +'s for vanity you've got the ToString overload. Hope this a satisfactory resolution.

Both Flurl and Flurl.Http have been upgraded with this change on NuGet.

from flurl.

Myster avatar Myster commented on August 28, 2024

Sounds good :-)

from flurl.

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.