Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

UTF-8 Parsing of HTTP Headers Fails in Async Server Connection (std::wstring support status) #311

Open
Assignees
deanberris
Labels
Milestone
@rubu

Description

@rubu

Hi,

I'm developing a HTTP server with cpp-netlib (0.10.1) and for the means to support Digest authentication i need to have std::wstring support (since usernames and passwords could contain non ASCII characters and those then would be present in the Digest headers. I saw that the existing server type tags all have default_string in them, but i managed to create a new one that has default_wstring in it, so far so good - but I'm getting compilation errors for the server_options type, since it uses the string type from the server tag, but has ASCII strings as initializers - well I thought i could avoid that one with just adding L" prefix to the default values since I'll be using only std::wstring version. But then the underlying boost ASIO part starts to fall since it's suing std::string to pass endpoint names etc., which of course makes sense.

So since i don't really understand the std::wstring support status, I'm not sure if this is an actual bug, but if it is, is trunk version already supporting std::wstring or is there any way I can tackle this? Does the options struct really need the string type from the Tag? Maybe i can fix that and live without it?

So at the moment, I'm down at the point where Boost ASIO fails with:

async_server.hpp(115) : error C2664: 'boost::asio::ip::basic_resolver_query::basic_resolver_query(const std::string &,boost::asio::ip::resolver_query_base::flags)' : cannot convert parameter 1 from 'std::basic_string<_Elem,_Traits,_Ax>' to 'const std::string &'
1> with
1> [
1> InternetProtocol=boost::asio::ip::tcp
1> ]
1> and
1> [
1> _Elem=wchar_t,
1> _Traits=std::char_traits<wchar_t>,
1> _Ax=std::allocator<wchar_t>
1> ]
1> Reason: cannot convert from 'std::basic_string<_Elem,_Traits,_Ax>' to 'const std::string'
1> with
1> [
1> _Elem=wchar_t,
1> _Traits=std::char_traits<wchar_t>,
1> _Ax=std::allocator<wchar_t>
1> ]

And I'm not sure what approach to use. Many thanks.

Best Regards,
Rudolfs Bundulis

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp