ext/soap: Windows handles query strings differently
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C
- Star
- 40.4k
- Fork
- 8.2k
- Merge trung bình
- 2 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 103
Mô tả
If I'm right, that would also happen on other OSs if ext/soap is built as shared library.
Nope, has nothing to do with shared libs – Windows specific issue.
The problem is that SoapServer expects "wsdl" as query string to deliver the WSDL. However, if a query string doesn't contain an equals sign, command line options are ignored on Windows. So either hack-around by making SoapServer more deliberate:
ext/soap/soap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 48a7fc8885..d7dfc4ecd5 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -1297,7 +1297,8 @@ PHP_METHOD(SoapServer, handle)
if (SG(request_info).request_method &&
strcmp(SG(request_info).request_method, "GET") == 0 &&
SG(request_info).query_string &&
- stricmp(SG(request_info).query_string, "wsdl") == 0) {
+ (stricmp(SG(request_info).query_string, "wsdl") == 0 ||
+ stricmp(SG(request_info).query_string, "wsdl=") == 0)) {
if (service->sdl) {
/*
or apply a proper fix for the tests, namely to spawn a php-cgi process with the command line options, and then send a CGI request and verify the response. Certainly possible, but I'm not sure it's worth the effort.
Originally posted by @cmb69 in https://github.com/php/php-src/issues/17432#issuecomment-2589593847
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu tại ext/soap/soap.c, ở SoapServer::handle, và xem xét cách hành vi của chuỗi truy vấn Windows CGI ảnh hưởng đến yêu cầu "wsdl". So sánh thay đổi xử lý trong một tệp được đề xuất với cách tiếp cận kiểm thử CGI thay thế được mô tả trong issue. Công việc được xem là hoàn tất khi Windows phục vụ WSDL cho chuỗi truy vấn bị ảnh hưởng và hành vi này được bao phủ bởi các bài kiểm thử hồi quy phù hợp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- c, php
- Lĩnh vực
- api, backend, operating-systems, testing-qa
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100