curl -X POST -d '{}' https://dtdev:8080/v1/dnscheck
this works because curl sends a default Content-Type header but if I make curl omit the default header I get this error.
curl -X POST -d '{}' https://dtdev:8080/v1/dnscheck -H 'Content-Type:'
Can't locate object method "seek" via package "Apache2::RequestRec" at /usr/share/perl5/Plack/Request.pm line 78.
Plack::Request::content(Dancer2::Core::Request=HASH(0x560b03b5a4f8)) called at /usr/share/perl5/Plack/Request.pm line 85
Plack::Request::raw_body(Dancer2::Core::Request=HASH(0x560b03b5a4f8)) called at /usr/share/perl5/Dancer2/Core/Request.pm line 98
Dancer2::Core::Request::body(Dancer2::Core::Request=HASH(0x560b03b5a4f8)) called at /usr/share/perl5/Dancer2/Core/Request.pm line 185
Dancer2::Core::Request::deserialize(Dancer2::Core::Request=HASH(0x560b03b5a4f8)) called at /usr/share/perl5/Dancer2/Core/Request.pm line 170
Dancer2::Core::Request::data(Dancer2::Core::Request=HASH(0x560b03b5a4f8)) called at /usr/share/perl5/Dancer2/Core/Request.pm line 76
Dancer2::Core::Request::new("Dancer2::Core::Request", "env", HASH(0x560b03ae5d00), "is_behind_proxy", 0, "serializer", Dancer2::Serializer::JSON=HASH(0x560b03887980)) called at /usr/share/perl5/Dancer2/Core/App.pm line 1572
Dancer2::Core::App::build_request(Dancer2::Core::App=HASH(0x560b034716f8), HASH(0x560b03ae5d00)) called at /usr/share/perl5/Dancer2/Core/App.pm line 1441
Dancer2::Core::App::dispatch(Dancer2::Core::App=HASH(0x560b034716f8), HASH(0x560b03ae5d00)) called at /usr/share/perl5/Dancer2/Core/App.pm line 1395
Dancer2::Core::App::__ANON__() called at /usr/share/perl5/Dancer2/Core/App.pm line 36
Dancer2::Core::App::__ANON__(CODE(0x560b03ae59d0)) called at /usr/share/perl5/Dancer2/Core/App.pm line 1395
eval {...} called at /usr/share/perl5/Dancer2/Core/App.pm line 1397
Dancer2::Core::App::__ANON__(HASH(0x560b03ae5d00)) called at /usr/share/perl5/Plack/Middleware/FixMissingBodyInRedirect.pm line 50
Plack::Middleware::FixMissingBodyInRedirect::call(Plack::Middleware::FixMissingBodyInRedirect=HASH(0x560b03a7e760), HASH(0x560b03ae5d00)) called at /usr/share/perl5/Plack/Component.pm line 50
Plack::Component::__ANON__(HASH(0x560b03ae5d00)) called at /usr/share/perl5/Plack/Middleware/Head.pm line 10
Plack::Middleware::Head::call(Plack::Middleware::Head=HASH(0x560b03a7f1e0), HASH(0x560b03ae5d00)) called at /usr/share/perl5/Plack/Component.pm line 50
Plack::Component::__ANON__(HASH(0x560b03ae5d00)) called at /usr/share/perl5/Plack/Handler/Apache2.pm line 87
Plack::Handler::Apache2::call_app("Plack::Handler::Apache2", Apache2::RequestRec=SCALAR(0x560afcf56cd0), CODE(0x560b03a7e7c0)) called at /home/foo/MyApp/lib/MyApp/REST/Transport/Apache.pm line 12
MyApp::REST::Transport::Apache::handler(Apache2::RequestRec=SCALAR(0x560afcf56cd0)) called at -e line 0
eval {...} called at -e line 0
irc#plack assumed it would be a Plack bug but miyagawa then said its probably a Dancer2 bug (https://github.com/plack/Plack/issues/655)
curl -X POST -d '{}' https://dtdev:8080/v1/dnscheck
this works because curl sends a default Content-Type header but if I make curl omit the default header I get this error.
curl -X POST -d '{}' https://dtdev:8080/v1/dnscheck -H 'Content-Type:'