GithubHelp home page GithubHelp logo

Comments (6)

seliopou avatar seliopou commented on August 21, 2024

Hello! From your description it sounds like the same bug that was fixed in #157, which is in the latest release (0.6.5). If you're on a previous release, I would suggest upgrading and seeing if that fixes your problem.

from httpaf.

lyrm avatar lyrm commented on August 21, 2024

Well, I have the right version. I looked at the function and it seems there is still an error in it: the internal function [loop] is recursively called with [name] instead of [needle] which is an issue in the case where these values are not equal...

So it should be :

let replace t name value =
  let rec loop t needle nv seen =
    match t with
    | [] ->
      if not seen then raise Local else []
    | (name,_ as nv')::t ->
      if CI.equal needle name
      then (
        if seen
        then loop t needle nv true
        else nv::loop t needle nv true)
      else nv'::loop t needle nv seen
  in
  try loop t name (name,value) false
  with Local -> t

Sorry, I am still not extremely familiar with git so I will not do a PR as it will take me sooo much time.

from httpaf.

lyrm avatar lyrm commented on August 21, 2024

(Note: I actually thought to check for current issues but not the resolved ones before writing here. Neither did I check if I was using the latest release. Not a problem here, but I will keep this is mind for next time !).

from httpaf.

seliopou avatar seliopou commented on August 21, 2024

I think that you may have mistyped something. The code block in your previous comment is exactly the implementation that is in master.

from httpaf.

seliopou avatar seliopou commented on August 21, 2024

I see the problem. I thought that fix was in 0.6.5 but it's not. However, the bug appears to be fixed in master.

from httpaf.

seliopou avatar seliopou commented on August 21, 2024

The fix will be in the next release.

from httpaf.

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.