Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
81714e24
Commit
81714e24
authored
Mar 23, 2010
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 553774: Make User.login correctly return cookies under JSON-RPC
r=dkl, a=mkanat
parent
ccb36aaa
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
JSONRPC.pm
Bugzilla/WebService/Server/JSONRPC.pm
+19
-0
No files found.
Bugzilla/WebService/Server/JSONRPC.pm
View file @
81714e24
...
@@ -52,6 +52,25 @@ sub create_json_coder {
...
@@ -52,6 +52,25 @@ sub create_json_coder {
# Override the JSON::RPC method to return our CGI object instead of theirs.
# Override the JSON::RPC method to return our CGI object instead of theirs.
sub
cgi
{
return
Bugzilla
->
cgi
;
}
sub
cgi
{
return
Bugzilla
->
cgi
;
}
# Override the JSON::RPC method to use $cgi->header properly instead of
# just printing text directly. This fixes various problems, including
# sending Bugzilla's cookies properly.
sub
response
{
my
(
$self
,
$response
)
=
@_
;
my
$headers
=
$response
->
headers
;
my
@header_args
;
foreach
my
$name
(
$headers
->
header_field_names
)
{
my
@values
=
$headers
->
header
(
$name
);
$name
=~
s/-/_/g
;
foreach
my
$value
(
@values
)
{
push
(
@header_args
,
"-$name"
,
$value
);
}
}
my
$cgi
=
$self
->
cgi
;
print
$cgi
->
header
(
-
status
=>
$response
->
code
,
@header_args
);
print
$response
->
content
;
}
sub
type
{
sub
type
{
my
(
$self
,
$type
,
$value
)
=
@_
;
my
(
$self
,
$type
,
$value
)
=
@_
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment