Skip to content

Commit

Permalink
Fix issue with URL joining when basePath is not defined in the spec
Browse files Browse the repository at this point in the history
  • Loading branch information
andresriancho committed May 21, 2019
1 parent b6d69e1 commit 1a9c142
Show file tree
Hide file tree
Showing 3 changed files with 14,002 additions and 1 deletion.
5 changes: 4 additions & 1 deletion w3af/core/data/parsers/doc/open_api/construct_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
import urlparse

from six import iteritems
from six import itervalues

Expand All @@ -36,7 +38,8 @@ def construct_request(operation, request_options, **op_kwargs):
:return: request in dict form
"""
url = operation.swagger_spec.api_url.rstrip('/') + operation.path_name
url = urlparse.urljoin(operation.swagger_spec.api_url, operation.path_name)

request = {
'method': str(operation.http_method.upper()),
'url': url,
Expand Down

0 comments on commit 1a9c142

Please sign in to comment.