mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-04 18:00:48 +08:00 
			
		
		
		
	
				
					committed by
					
						
						Marcelo Castagna
					
				
			
			
				
	
			
			
			
						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;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user