Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
79856e65
Commit
79856e65
authored
7 years ago
by
Rider Linden
Browse files
Options
Downloads
Patches
Plain Diff
MAINT-7634: Feedback from code review, move enum to string converter to own function.
parent
10386335
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/llcorehttp/_httpoprequest.cpp
+20
-18
20 additions, 18 deletions
indra/llcorehttp/_httpoprequest.cpp
indra/llcorehttp/_httpoprequest.h
+3
-1
3 additions, 1 deletion
indra/llcorehttp/_httpoprequest.h
with
23 additions
and
19 deletions
indra/llcorehttp/_httpoprequest.cpp
+
20
−
18
View file @
79856e65
...
...
@@ -247,24 +247,7 @@ void HttpOpRequest::visitNotifier(HttpRequest * request)
response
->
setHeaders
(
mReplyHeaders
);
response
->
setRequestURL
(
mReqURL
);
std
::
string
method
(
"UNKNOWN"
);
if
(
mReqMethod
==
HOR_COPY
)
method
=
"COPY"
;
else
if
(
mReqMethod
==
HOR_DELETE
)
method
=
"DELETE"
;
else
if
(
mReqMethod
==
HOR_GET
)
method
=
"GET"
;
else
if
(
mReqMethod
==
HOR_MOVE
)
method
=
"MOVE"
;
else
if
(
mReqMethod
==
HOR_PATCH
)
method
=
"PATCH"
;
else
if
(
mReqMethod
==
HOR_POST
)
method
=
"POST"
;
else
if
(
mReqMethod
==
HOR_PUT
)
method
=
"PUT"
;
response
->
setRequestMethod
(
method
);
response
->
setRequestMethod
(
methodToString
(
mReqMethod
));
if
(
mReplyOffset
||
mReplyLength
)
{
...
...
@@ -1161,6 +1144,25 @@ int HttpOpRequest::debugCallback(CURL * handle, curl_infotype info, char * buffe
return
0
;
}
std
::
string
HttpOpRequest
::
methodToString
(
const
HttpOpRequest
::
EMethod
&
e
)
{
if
(
e
==
HOR_COPY
)
return
"COPY"
;
else
if
(
e
==
HOR_DELETE
)
return
"DELETE"
;
else
if
(
e
==
HOR_GET
)
return
"GET"
;
else
if
(
e
==
HOR_MOVE
)
return
"MOVE"
;
else
if
(
e
==
HOR_PATCH
)
return
"PATCH"
;
else
if
(
e
==
HOR_POST
)
return
"POST"
;
else
if
(
e
==
HOR_PUT
)
return
"PUT"
;
return
"UNKNOWN"
;
}
}
// end namespace LLCore
...
...
This diff is collapsed.
Click to expand it.
indra/llcorehttp/_httpoprequest.h
+
3
−
1
View file @
79856e65
...
...
@@ -87,7 +87,8 @@ class HttpOpRequest : public HttpOperation
HOR_COPY
,
HOR_MOVE
};
static
std
::
string
methodToString
(
const
EMethod
&
);
virtual
void
stageFromRequest
(
HttpService
*
);
virtual
void
stageFromReady
(
HttpService
*
);
virtual
void
stageFromActive
(
HttpService
*
);
...
...
@@ -235,6 +236,7 @@ class HttpOpRequest : public HttpOperation
};
// end class HttpOpRequest
/// HttpOpRequestCompare isn't an operation but a uniform comparison
/// functor for STL containers that order by priority. Mainly
/// used for the ready queue container but defined here.
...
...
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