Project

General

Profile

Bug #34035

Remove path from proxy_pass to disable decoding in API

Added by Eric Turgeon about 1 year ago. Updated about 1 year ago.

Status:
Done
Priority:
No priority
Assignee:
William Grzybowski
Category:
Middleware
Target version:
Severity:
Medium
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

I had tried to delete dataset from Rest API 2.0 and I get '404: Not Found' here are my IPython logs.

In [14]: GET('/pool/dataset?id=tank/smb-bsd').json()
Out[14]: 
[{'atime': {'parsed': True,
   'rawvalue': 'on',
   'source': 'DEFAULT',
   'value': 'ON'},
  'casesensitivity': {'parsed': 'sensitive',
   'rawvalue': 'sensitive',
   'source': 'NONE',
   'value': 'SENSITIVE'},
  'children': [],
  'compression': {'parsed': 'lz4',
   'rawvalue': 'lz4',
   'source': 'INHERITED',
   'value': 'LZ4'},
  'copies': {'parsed': 1, 'rawvalue': '1', 'source': 'DEFAULT', 'value': '1'},
  'deduplication': {'parsed': 'off',
   'rawvalue': 'off',
   'source': 'DEFAULT',
   'value': 'OFF'},
  'exec': {'parsed': True,
   'rawvalue': 'on',
   'source': 'DEFAULT',
   'value': 'ON'},
  'id': 'tank/smb-bsd',
  'mountpoint': '/mnt/tank/smb-bsd',
  'name': 'tank/smb-bsd',
  'origin': {'parsed': '', 'rawvalue': '', 'source': 'NONE', 'value': ''},
  'pool': 'tank',
  'quota': {'parsed': None,
   'rawvalue': '0',
   'source': 'DEFAULT',
   'value': None},
  'readonly': {'parsed': False,
   'rawvalue': 'off',
   'source': 'DEFAULT',
   'value': 'OFF'},
  'recordsize': {'parsed': 131072,
   'rawvalue': '131072',
   'source': 'DEFAULT',
   'value': '128K'},
  'refquota': {'parsed': None,
   'rawvalue': '0',
   'source': 'DEFAULT',
   'value': None},
  'refreservation': {'parsed': None,
   'rawvalue': '0',
   'source': 'DEFAULT',
   'value': None},
  'reservation': {'parsed': None,
   'rawvalue': '0',
   'source': 'DEFAULT',
   'value': None},
  'share_type': 'UNIX',
  'snapdir': {'parsed': None,
   'rawvalue': 'hidden',
   'source': 'DEFAULT',
   'value': 'HIDDEN'},
  'sync': {'parsed': 'standard',
   'rawvalue': 'standard',
   'source': 'DEFAULT',
   'value': 'STANDARD'},
  'type': 'FILESYSTEM'}]

In [15]: DELETE("/pool/dataset/id/tank/smb-bsd").text
Out[15]: '404: Not Found'

Associated revisions

Revision 8f171e5a (diff)
Added by William Grzybowski about 1 year ago

fix(ngix-middlewared): remove path from proxy_pass to disable decoding

Ticket: #34035

Revision 6e74fe27 (diff)
Added by William Grzybowski about 1 year ago

fix(ngix-middlewared): remove path from proxy_pass to disable decoding

Ticket: #34035

History

#1 Updated by Eric Turgeon about 1 year ago

  • Description updated (diff)

#2 Updated by Dru Lavigne about 1 year ago

  • Assignee changed from Release Council to William Grzybowski

#3 Updated by William Grzybowski about 1 year ago

  • Status changed from Unscreened to In Progress
  • Target version changed from Backlog to 11.2-BETA1
  • Severity changed from New to Medium

#4 Updated by William Grzybowski about 1 year ago

  • Status changed from In Progress to Ready for Testing
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#5 Updated by William Grzybowski about 1 year ago

  • Status changed from Ready for Testing to In Progress

#6 Updated by William Grzybowski about 1 year ago

  • Status changed from In Progress to Ready for Testing

#7 Updated by William Grzybowski about 1 year ago

You will have to url encode the slashs here for it to work:

eg. tank/foo -> tank%2Ffoo

DELETE /pool/dataset/id/tank%2Ffoo/

#8 Updated by Dru Lavigne about 1 year ago

  • Subject changed from Rest API 2 DELETE /pool/dataset/id/{id} returning '404: Not Found' to Remove path from proxy_pass to disable decoding in API

#9 Updated by Eric Turgeon about 1 year ago

  • Needs QA changed from Yes to No

Tested and it is fixed.

#10 Updated by Dru Lavigne about 1 year ago

  • Status changed from Ready for Testing to Done

Also available in: Atom PDF