Skip to content

Commit

Permalink
ae.net.http: Add workaround for DMD issue 24050
Browse files Browse the repository at this point in the history
One of the many awful wrong-code bugs that really need to be fixed,
but unfortunately are unlikely to be fixed soon.
  • Loading branch information
CyberShadow committed Dec 29, 2024
1 parent 97e95b4 commit dc3ebb3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
3 changes: 2 additions & 1 deletion net/http/common.d
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,11 @@ public:
return decodeUrlParameters(data.joinToGC().as!string);
case "multipart/form-data":
return decodeMultipart(data.joinData(), contentType.properties.get("boundary", null))
.map!(part => tuple(
.map!((ref part) => tuple(
part.headers.get("Content-Disposition", null).decodeTokenHeader.properties.get("name", null),
part.data.asDataOf!char.toGC().assumeUnique,
))
.array // https://issues.dlang.org/show_bug.cgi?id=24050
.UrlParameters;
case "":
throw new Exception("No Content-Type");
Expand Down
8 changes: 0 additions & 8 deletions net/http/server.d
Original file line number Diff line number Diff line change
Expand Up @@ -778,14 +778,6 @@ b=7654321").asBytes));
// Test form-data
debug(ae_unittest) unittest
{
// Temporarily disabled due to DMD regression
// https://issues.dlang.org/show_bug.cgi?id=24050
{
import std.process : environment;
if ("BUILDKITE" in environment)
return;
}

bool ok;
auto s = new HttpServer;
s.handleRequest = (HttpRequest request, HttpServerConnection conn) {
Expand Down

0 comments on commit dc3ebb3

Please sign in to comment.