mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-23 00:32:50 +08:00
parent
eedc47c850
commit
b4f5b68614
@ -44,7 +44,7 @@ namespace Ocelot.Request.Middleware
|
||||
Port = Port,
|
||||
Host = Host,
|
||||
Path = AbsolutePath,
|
||||
Query = Query,
|
||||
Query = RemoveLeadingQuestionMark(Query),
|
||||
Scheme = Scheme
|
||||
};
|
||||
|
||||
@ -59,7 +59,7 @@ namespace Ocelot.Request.Middleware
|
||||
Port = Port,
|
||||
Host = Host,
|
||||
Path = AbsolutePath,
|
||||
Query = Query,
|
||||
Query = RemoveLeadingQuestionMark(Query),
|
||||
Scheme = Scheme
|
||||
};
|
||||
|
||||
@ -70,5 +70,15 @@ namespace Ocelot.Request.Middleware
|
||||
{
|
||||
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