Soup.ClientContext client) {
// Ignore if message isn't ours
if (msg == this.msg)
- this.end (true);
+ this.end (true, Soup.KnownStatusCode.NONE);
}
public void set_mime_type (string mime_type) {
this.server.unpause_message (this.msg);
}
- public virtual void end (bool aborted) {
+ public virtual void end (bool aborted, uint status) {
+ if (status != Soup.KnownStatusCode.NONE) {
+ this.msg.set_status (status);
+ }
+
this.ended ();
}
}
warning ("Failed to read from URI: %s: %s\n",
file.get_uri (),
err.message);
- this.msg.set_status (Soup.KnownStatusCode.NOT_FOUND);
+ this.end (false, Soup.KnownStatusCode.NOT_FOUND);
return;
}
seek.stop.to_string (),
file.get_uri (),
err.message);
- this.msg.set_status (
- Soup.KnownStatusCode.REQUESTED_RANGE_NOT_SATISFIABLE);
+ this.end (false,
+ Soup.KnownStatusCode.REQUESTED_RANGE_NOT_SATISFIABLE);
return;
}
}
warning ("Failed to read contents from URI: %s: %s\n",
this.file.get_uri (),
err.message);
- this.msg.set_status (Soup.KnownStatusCode.NOT_FOUND);
+ this.end (false, Soup.KnownStatusCode.NOT_FOUND);
return;
}
this.push_data (this.buffer, this.length);
- this.end (false);
+ this.end (false, Soup.KnownStatusCode.NONE);
}
}
this.pipeline.set_state (State.PLAYING);
}
- public override void end (bool aborted) {
+ public override void end (bool aborted, uint status) {
this.pipeline.set_state (State.NULL);
// Flush the queue of buffers
Buffer buffer = null;
this.msg.response_body.complete ();
}
- base.end (aborted);
+ base.end (aborted, status);
}
private void prepare_pipeline (string name,
critical ("Failed to link %s to %s",
depay.name,
sink.name);
- this.end (false);
+ this.end (false, Soup.KnownStatusCode.NONE);
return;
}
critical ("Failed to link pad %s to %s",
src_pad.name,
sink_pad.name);
- this.end (false);
+ this.end (false, Soup.KnownStatusCode.NONE);
return;
}
}
if (!ret) {
- this.end (false);
+ this.end (false, Soup.KnownStatusCode.NONE);
}
return ret;