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
1ada34fc
Commit
1ada34fc
authored
18 years ago
by
Kelly Washington
Browse files
Options
Downloads
Patches
Plain Diff
merge -r58842:59035 branches/loadstone-names to release
parent
9d3309f6
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/llcommon/lluri.cpp
+35
-0
35 additions, 0 deletions
indra/llcommon/lluri.cpp
indra/llcommon/lluri.h
+2
-1
2 additions, 1 deletion
indra/llcommon/lluri.h
indra/llmessage/llhttpclient.cpp
+16
-4
16 additions, 4 deletions
indra/llmessage/llhttpclient.cpp
with
53 additions
and
5 deletions
indra/llcommon/lluri.cpp
+
35
−
0
View file @
1ada34fc
...
@@ -278,6 +278,23 @@ LLURI LLURI::buildBulkAgentPresenceURI(LLApp* app)
...
@@ -278,6 +278,23 @@ LLURI LLURI::buildBulkAgentPresenceURI(LLApp* app)
return
buildBackboneURL
(
app
,
"agent"
,
"presence"
);
return
buildBackboneURL
(
app
,
"agent"
,
"presence"
);
}
}
// static
LLURI
LLURI
::
buildBulkAgentNamesURI
(
LLApp
*
app
)
{
std
::
string
host
=
"localhost:12040"
;
if
(
app
)
{
host
=
app
->
getOption
(
"backbone-host-port"
).
asString
();
}
LLSD
path
=
LLSD
::
emptyArray
();
path
.
append
(
"agent"
);
path
.
append
(
"names"
);
return
buildHTTP
(
host
,
path
);
}
// static
// static
LLURI
LLURI
::
buildAgentSessionURI
(
const
LLUUID
&
agent_id
,
LLApp
*
app
)
LLURI
LLURI
::
buildAgentSessionURI
(
const
LLUUID
&
agent_id
,
LLApp
*
app
)
{
{
...
@@ -303,6 +320,24 @@ LLURI LLURI::buildInventoryHostURI(const LLUUID& agent_id, LLApp* app)
...
@@ -303,6 +320,24 @@ LLURI LLURI::buildInventoryHostURI(const LLUUID& agent_id, LLApp* app)
return
buildHTTP
(
host
,
path
);
return
buildHTTP
(
host
,
path
);
}
}
// static
LLURI
LLURI
::
buildAgentNameURI
(
const
LLUUID
&
agent_id
,
LLApp
*
app
)
{
std
::
string
host
=
"localhost:12040"
;
if
(
app
)
{
host
=
app
->
getOption
(
"backbone-host-port"
).
asString
();
}
LLSD
path
=
LLSD
::
emptyArray
();
path
.
append
(
"agent"
);
path
.
append
(
agent_id
);
path
.
append
(
"name"
);
return
buildHTTP
(
host
,
path
);
}
// static
// static
LLURI
LLURI
::
buildAgentLoginInfoURI
(
const
LLUUID
&
agent_id
,
const
std
::
string
&
dataserver
)
LLURI
LLURI
::
buildAgentLoginInfoURI
(
const
LLUUID
&
agent_id
,
const
std
::
string
&
dataserver
)
{
{
...
...
This diff is collapsed.
Click to expand it.
indra/llcommon/lluri.h
+
2
−
1
View file @
1ada34fc
...
@@ -79,10 +79,11 @@ class LLURI
...
@@ -79,10 +79,11 @@ class LLURI
// Functions for building specific URIs for web services
// Functions for building specific URIs for web services
static
LLURI
buildAgentPresenceURI
(
const
LLUUID
&
agent_id
,
LLApp
*
app
);
static
LLURI
buildAgentPresenceURI
(
const
LLUUID
&
agent_id
,
LLApp
*
app
);
static
LLURI
buildBulkAgentPresenceURI
(
LLApp
*
app
);
static
LLURI
buildBulkAgentPresenceURI
(
LLApp
*
app
);
static
LLURI
buildBulkAgentNamesURI
(
LLApp
*
app
);
static
LLURI
buildAgentSessionURI
(
const
LLUUID
&
agent_id
,
LLApp
*
app
);
static
LLURI
buildAgentSessionURI
(
const
LLUUID
&
agent_id
,
LLApp
*
app
);
static
LLURI
buildAgentLoginInfoURI
(
const
LLUUID
&
agent_id
,
const
std
::
string
&
dataserver
);
static
LLURI
buildAgentLoginInfoURI
(
const
LLUUID
&
agent_id
,
const
std
::
string
&
dataserver
);
static
LLURI
buildInventoryHostURI
(
const
LLUUID
&
agent_id
,
LLApp
*
app
);
static
LLURI
buildInventoryHostURI
(
const
LLUUID
&
agent_id
,
LLApp
*
app
);
static
LLURI
buildAgentNameURI
(
const
LLUUID
&
agent_id
,
LLApp
*
app
);
private:
private:
std
::
string
mScheme
;
std
::
string
mScheme
;
std
::
string
mEscapedOpaque
;
std
::
string
mEscapedOpaque
;
...
...
This diff is collapsed.
Click to expand it.
indra/llmessage/llhttpclient.cpp
+
16
−
4
View file @
1ada34fc
...
@@ -265,11 +265,19 @@ class LLHTTPBuffer
...
@@ -265,11 +265,19 @@ class LLHTTPBuffer
LLSD
asLLSD
()
LLSD
asLLSD
()
{
{
LLSD
content
;
LLSD
content
;
if
(
mBuffer
.
empty
())
return
content
;
std
::
istringstream
istr
(
mBuffer
);
std
::
istringstream
istr
(
mBuffer
);
LLSDSerialize
::
fromXML
(
content
,
istr
);
LLSDSerialize
::
fromXML
(
content
,
istr
);
return
content
;
return
content
;
}
}
std
::
string
asString
()
{
return
mBuffer
;
}
private
:
private
:
std
::
string
mBuffer
;
std
::
string
mBuffer
;
};
};
...
@@ -298,15 +306,20 @@ LLSD LLHTTPClient::blockingGet(const std::string& url)
...
@@ -298,15 +306,20 @@ LLSD LLHTTPClient::blockingGet(const std::string& url)
S32
http_status
=
499
;
S32
http_status
=
499
;
curl_easy_getinfo
(
curlp
,
CURLINFO_RESPONSE_CODE
,
&
http_status
);
curl_easy_getinfo
(
curlp
,
CURLINFO_RESPONSE_CODE
,
&
http_status
);
response
[
"status"
]
=
http_status
;
if
(
curl_success
!=
0
if
(
curl_success
!=
0
&&
http_status
!=
404
)
// We expect 404s, don't spam for them.
&&
http_status
!=
404
)
// We expect 404s, don't spam for them.
{
{
llwarns
<<
"CURL ERROR: "
<<
curl_error_buffer
<<
llendl
;
llwarns
<<
"CURL ERROR: "
<<
curl_error_buffer
<<
llendl
;
response
[
"body"
]
=
http_buffer
.
asString
();
}
else
{
response
[
"body"
]
=
http_buffer
.
asLLSD
();
}
}
response
[
"status"
]
=
http_status
;
response
[
"body"
]
=
http_buffer
.
asLLSD
();
curl_easy_cleanup
(
curlp
);
curl_easy_cleanup
(
curlp
);
return
response
;
return
response
;
...
@@ -375,4 +388,3 @@ namespace boost
...
@@ -375,4 +388,3 @@ namespace boost
}
}
}
}
};
};
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