FastHttpApi icon indicating copy to clipboard operation
FastHttpApi copied to clipboard

CROS an Cookie Problem

Open mbtolou opened this issue 2 years ago • 2 comments

Hello.

You can see two other beetlex errors in the following repository:

CORS Origin does not work. The cookie parser does not work and you must call the parser before using it.

https://github.com/mbtolou/beetlex-error

mbtolou avatar Dec 11 '22 04:12 mbtolou

Custom OptionsAttribute

    class MyOptions : BeetleX.FastHttpApi.OptionsAttribute {
        public override void SetResponse(HttpRequest request, HttpResponse response)
        {
            base.SetResponse(request, response);
        }
    }

beetlex-io avatar Dec 11 '22 10:12 beetlex-io

In This Line :

https://github.com/beetlex-io/FastHttpApi/blob/b695cdb3702a68dfde919e374f1f735abd4cf32b/src/Header.cs#L364

convert :

if (line[0] == 'C' && line[5] == 'e' && line[1] == 'o' && line[2] == 'o' && line[3] == 'k' && line[4] == 'i')
{
    HttpParse.AnalyzeCookie(line.Slice(8, line.Length - 8), cookies);
}

To

if ((line[0] == 'C' || line[0] == 'c' ) && line[5] == 'e' && line[1] == 'o' && line[2] == 'o' && line[3] == 'k' && line[4] == 'i')
{
    HttpParse.AnalyzeCookie(line.Slice(8, line.Length - 8), cookies);
}

Fix Cookie Problem.

mbtolou avatar Dec 11 '22 15:12 mbtolou