mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-22 06:22:50 +08:00
parent
eedc47c850
commit
b4f5b68614
@ -44,7 +44,7 @@ namespace Ocelot.Request.Middleware
|
|||||||
Port = Port,
|
Port = Port,
|
||||||
Host = Host,
|
Host = Host,
|
||||||
Path = AbsolutePath,
|
Path = AbsolutePath,
|
||||||
Query = Query,
|
Query = RemoveLeadingQuestionMark(Query),
|
||||||
Scheme = Scheme
|
Scheme = Scheme
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ namespace Ocelot.Request.Middleware
|
|||||||
Port = Port,
|
Port = Port,
|
||||||
Host = Host,
|
Host = Host,
|
||||||
Path = AbsolutePath,
|
Path = AbsolutePath,
|
||||||
Query = Query,
|
Query = RemoveLeadingQuestionMark(Query),
|
||||||
Scheme = Scheme
|
Scheme = Scheme
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -70,5 +70,15 @@ namespace Ocelot.Request.Middleware
|
|||||||
{
|
{
|
||||||
return ToUri();
|
return ToUri();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string RemoveLeadingQuestionMark(string query)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(query) && query.StartsWith("?"))
|
||||||
|
{
|
||||||
|
return query.Substring(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return query;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user