CatInRl opened a new issue, #3784: URL: https://github.com/apache/servicecomb-java-chassis/issues/3784
https://github.com/apache/servicecomb-java-chassis/blob/b5d69c45ccf10e5bddc6b3d0204a2e942e930d73/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/http/HttpUtils.java#LL36C89-L36C89 ```java /** * paramName is not case sensitive * @param headerValue example: attachment;filename=a.txt * */ public static String parseParamFromHeaderValue(String headerValue, String paramName) { if (StringUtils.isEmpty(headerValue)) { return null; } for (String value : headerValue.split(";")) { int idx = value.indexOf('='); if (idx == -1) { continue; } if (paramName.equalsIgnoreCase(value.substring(0, idx))) { return value.substring(idx + 1); } } return null; } ``` 解析`Content-Disposition`时,只支持解析`attachment;filename=a.txt`,不支持解析`attachment; filename=a.txt` 协议标准中`Content-Disposition`这个header在filename前就是带空格的:https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition#syntax -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
