Toggle navigation
Toggle navigation
This project
Loading...
Sign in
iOS
/
asi-http-request
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Ben Copsey
2009-05-16 18:00:32 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7aca62d514c4b0523e1150695d1b9bdd9f66a615
7aca62d5
1 parent
8c2584da
Fix some issues with progress create by last changeset
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
14 deletions
Classes/ASIHTTPRequest.m
Classes/ASINetworkQueue.m
Classes/ASIHTTPRequest.m
View file @
7aca62d
...
...
@@ -398,17 +398,15 @@ static NSError *ASIUnableToCreateRequestError;
lastBytesRead
=
0
;
// If we're retrying a request after an authentication failure, let's remove any progress we made
if
(
lastBytesSent
>
0
&&
uploadProgressDelegate
)
{
if
(
lastBytesSent
>
0
)
{
[
self
removeUploadProgressSoFar
];
}
lastBytesSent
=
0
;
if
(
shouldResetProgressIndicators
)
{
contentLength
=
0
;
if
(
downloadProgressDelegate
)
{
[
self
resetDownloadProgress
:
0
];
}
}
[
self
setResponseHeaders
:
nil
];
if
(
!
[
self
downloadDestinationPath
])
{
[
self
setRawResponseData
:[[[
NSMutableData
alloc
]
init
]
autorelease
]];
...
...
@@ -633,17 +631,6 @@ static NSError *ASIUnableToCreateRequestError;
{
[
progressLock
lock
];
//We're using a progress queue or compatible controller to handle progress
SEL
selector
=
@selector
(
incrementUploadSizeBy
:
);
if
([
queue
respondsToSelector
:
selector
])
{
NSMethodSignature
*
signature
=
[[
queue
class
]
instanceMethodSignatureForSelector
:
selector
];
NSInvocation
*
invocation
=
[
NSInvocation
invocationWithMethodSignature
:
signature
];
[
invocation
setTarget
:
queue
];
[
invocation
setSelector
:
selector
];
[
invocation
setArgument
:
&
value
atIndex
:
2
];
[
invocation
invoke
];
}
// Request this request's own upload progress delegate
if
(
uploadProgressDelegate
)
{
[
ASIHTTPRequest
setProgress
:
0
forProgressIndicator
:
uploadProgressDelegate
];
...
...
Classes/ASINetworkQueue.m
View file @
7aca62d
...
...
@@ -137,6 +137,7 @@
//Tell the request not to reset the progress indicator when it gets a content-length, as we will get the length from the HEAD request
[
request
setShouldResetProgressIndicators
:
NO
];
[
request
addDependency
:
HEADRequest
];
// If we want to track uploading for this request accurately, we need to add the size of the post content to the total
...
...
@@ -147,6 +148,7 @@
}
[
request
setShowAccurateProgress
:
showAccurateProgress
];
[
request
setQueue
:
self
];
[
super
addOperation
:
request
];
}
...
...
Please
register
or
login
to post a comment