Bilal-S / iis2tomcat

AJP Connector between Internet Information Services (IIS) and Apache Tomcat
http://www.boncode.net/boncode-connector
49 stars 32 forks source link

Fix PathPrefix bug. #105

Closed bprucha closed 3 years ago

bprucha commented 3 years ago

When a request is made where the URI string length is shorter than the string length of the PathPrefix value the following exception gets thrown:

Index and length must refer to a location within the string. Parameter name: length at System.String.Substring(Int32 startIndex, Int32 length) at BonCodeAJP13.ServerPackets.BonCodeAJP13ForwardRequest.WritePacket(Byte method, String protocol, String req_uri, String remote_addr, String remote_host, String server_name, UInt16 server_port, Boolean is_ssl, Int32 num_headers, NameValueCollection httpHeaders, String realPathInfo, Int32 sourcePort, String vDirs) at BonCodeAJP13.ServerPackets.BonCodeAJP13ForwardRequest.WritePacket(NameValueCollection httpHeaders, String pathInfo, Int32 sourcePort, String vDirs) at BonCodeIIS.BonCodeCallHandler.ProcessRequest(HttpContext context)

This pull request resolves that bug.

Bilal-S commented 3 years ago

interesting. Thanks for submitting a PR.