mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2025-12-06 07:42:03 +01:00
Merge pull request #337 from Schrolli91/fix_http_req
fix http request plugin bug
This commit is contained in:
commit
4f0caae300
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -3,3 +3,7 @@
|
|||
*.log
|
||||
config.ini
|
||||
log/
|
||||
|
||||
\.project
|
||||
|
||||
\.pydevproject
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
##### Removed
|
||||
- Beta Branch aus Readme, Installer und Travis-CI entfernt [#324](https://github.com/Schrolli91/BOSWatch/pull/324)
|
||||
##### Fixed
|
||||
- Bug in httpRequest Plugin (data Field wurde überschrieben) [#337](https://github.com/Schrolli91/BOSWatch/pull/337)
|
||||
- Kommentar für FirEmergency Einstellung angepasst [#338](https://github.com/Schrolli91/BOSWatch/pull/338)
|
||||
##### Security
|
||||
|
||||
|
|
|
|||
|
|
@ -68,11 +68,13 @@ def run(typ,freq,data):
|
|||
|
||||
try:
|
||||
#
|
||||
# Replace special characters in data Strings for URL
|
||||
# Make a copy of the data field to not overwrite the data in it
|
||||
# Replace special characters in dataCopy Strings for URL
|
||||
#
|
||||
for key in data:
|
||||
if isinstance(data[key], basestring):
|
||||
data[key] = urllib.quote(data[key])
|
||||
dataCopy = dict(data)
|
||||
for key in dataCopy:
|
||||
if isinstance(dataCopy[key], basestring):
|
||||
dataCopy[key] = urllib.quote(dataCopy[key])
|
||||
#
|
||||
# Get URLs
|
||||
#
|
||||
|
|
@ -90,7 +92,7 @@ def run(typ,freq,data):
|
|||
# replace wildcards
|
||||
#
|
||||
for (i, url) in enumerate(urls):
|
||||
urls[i] = wildcardHandler.replaceWildcards(urls[i].strip(), data)
|
||||
urls[i] = wildcardHandler.replaceWildcards(urls[i].strip(), dataCopy)
|
||||
#
|
||||
# HTTP-Request
|
||||
#
|
||||
|
|
|
|||
Loading…
Reference in a new issue