From 61b7af3a835270b77d1e4d17b7e45261486bed44 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 4 Oct 2016 17:41:37 +0100 Subject: Fix where to find uploaded content type --- icespider/core/ihttpRequest.cpp | 2 +- icespider/core/ihttpRequest.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'icespider/core') diff --git a/icespider/core/ihttpRequest.cpp b/icespider/core/ihttpRequest.cpp index ea2c0bd..bd4d790 100644 --- a/icespider/core/ihttpRequest.cpp +++ b/icespider/core/ihttpRequest.cpp @@ -21,7 +21,7 @@ namespace IceSpider { { try { return Slicer::StreamDeserializerFactory::createNew( - getHeaderParam("Content-Type") / []() -> std::string { + getEnv("CONTENT_TYPE") / []() -> std::string { throw Http400_BadRequest(); }, getInputStream()); } diff --git a/icespider/core/ihttpRequest.h b/icespider/core/ihttpRequest.h index 6537ebf..38598e8 100644 --- a/icespider/core/ihttpRequest.h +++ b/icespider/core/ihttpRequest.h @@ -28,6 +28,7 @@ namespace IceSpider { const std::string & getURLParam(unsigned int) const; virtual OptionalString getQueryStringParam(const std::string &) const = 0; virtual OptionalString getHeaderParam(const std::string &) const = 0; + virtual OptionalString getEnv(const std::string &) const = 0; virtual Slicer::DeserializerPtr getDeserializer() const; virtual ContentTypeSerializer getSerializer(const IRouteHandler *) const; virtual std::istream & getInputStream() const = 0; -- cgit v1.2.3