HerikLyma / CPPWebFramework

​The C++ Web Framework (CWF) is a MVC web framework, Open Source, under MIT License, using C++ with Qt to be used in the development of web applications.
MIT License
445 stars 119 forks source link

Server Not Handling Multiple Cookies Adequately #9

Closed doumdi closed 5 years ago

doumdi commented 5 years ago

I had to patch HttpParser To handle multiple cookies. QNetworkCookie::parseCookies expects cookies separated by '\n' but the browsers send them separated by semicolons only. I replaced the line const QByteArray &txt = temp[i]; by QByteArray txt = temp[i].replace(";",";\n"); (adding a '\n' for every cookie) and it fixed the problem.

HerikLyma commented 5 years ago

Many thanks again my friend. Would you like to commit? I would like you to keep credits for this contribution.

doumdi commented 5 years ago

This is such a small contribution, you can take credit for it. I am not sure though if it fits all use cases.

HerikLyma commented 5 years ago

Hello my friend. This problem has been fixed.

Thanks for reporting it.