Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ISIS3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aflab
astrogeology
ISIS3
Commits
e46b6e20
Unverified
Commit
e46b6e20
authored
6 months ago
by
Amy Stamile
Committed by
GitHub
6 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Updates SpiceClient to handle redirect requests (#5696)
parent
09cba88a
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
isis/src/base/apps/spiceinit/SpiceClient.cpp
+12
-22
12 additions, 22 deletions
isis/src/base/apps/spiceinit/SpiceClient.cpp
with
13 additions
and
22 deletions
CHANGELOG.md
+
1
−
0
View file @
e46b6e20
...
...
@@ -41,6 +41,7 @@ release.
### Fixed
-
Fixed kaguyatc2isis invalid BandBin values
[
#5629
](
https://github.com/DOI-USGS/ISIS3/issues/5629
)
-
Fixed SpiceClient to handle redirect requests.
## [9.0.0] - 09-25-2024
...
...
This diff is collapsed.
Click to expand it.
isis/src/base/apps/spiceinit/SpiceClient.cpp
+
12
−
22
View file @
e46b6e20
...
...
@@ -85,25 +85,6 @@ namespace Isis {
*
p_xml
=
QString
(
QByteArray
(
raw
.
toLatin1
()).
toHex
().
constData
());
/*
* For Debugging, you may want to run spiceserver locally (without spiceinit).
*
* Uncomment the following code and run the spiceinit with web=true. An error will be thrown
* with the file name of the stored input hex file. You can rsync that file to your work area
* and run spiceserver locally.
*/
// const char *inmode = "overwrite";
// const char *ext = "dat";
// TextFile newInput;
// QString serverInputFile("/tmp/input");
// newInput.Open(serverInputFile, inmode, ext);
// newInput.Rewind();//start at begining
// newInput.PutLine(hexCode);
// newInput.Close();
// QString msg = "Exporting expected server input to: " + serverInputFile;
// throw IException(IException::Programmer, msg, _FILEINFO_);
int
contentLength
=
p_xml
->
length
();
QString
contentLengthStr
=
toString
((
BigInt
)
contentLength
);
...
...
@@ -112,9 +93,6 @@ namespace Isis {
p_request
->
setRawHeader
(
"User-Agent"
,
"SpiceInit 1.0"
);
p_request
->
setHeader
(
QNetworkRequest
::
ContentTypeHeader
,
"application/x-www-form-urlencoded"
);
//p_request->setRawHeader("Content-Length", contentLengthStr.c_str());
//p_request->setAttribute(QNetworkRequest::DoNotBufferUploadDataAttribute,
// true);
moveToThread
(
this
);
start
();
...
...
@@ -179,6 +157,18 @@ namespace Isis {
* @param reply
*/
void
SpiceClient
::
replyFinished
(
QNetworkReply
*
reply
)
{
// Check for redirection
QVariant
redirectionTarget
=
reply
->
attribute
(
QNetworkRequest
::
RedirectionTargetAttribute
);
if
(
!
redirectionTarget
.
isNull
())
{
QUrl
redirectedUrl
=
redirectionTarget
.
toUrl
();
// Update the request with the new URL and re-send
p_request
->
setUrl
(
redirectedUrl
);
sendRequest
();
return
;
}
// No redirection, proceed with the original processing
p_rawResponse
=
new
QString
(
QString
(
reply
->
readAll
()));
// Decode the response
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment