Permalink
Browse files

getFragment does not support TLS any more

You can’t handle the load? Closes #202
  • Loading branch information...
1 parent 2a11e69 commit a28839739c62cd589b1c31e76696fd5831f84520 @PromyLOPh PromyLOPh committed Jan 10, 2012
Showing with 8 additions and 0 deletions.
  1. +4 −0 src/libpiano/piano.c
  2. +3 −0 src/libpiano/piano.h
  3. +1 −0 src/ui.c
View
@@ -236,6 +236,8 @@ PianoReturn_t PianoRequest (PianoHandle_t *ph, PianoRequest_t *req,
assert (req != NULL);
req->type = type;
+ /* no tls by default */
+ req->secure = false;
switch (req->type) {
case PIANO_REQUEST_LOGIN: {
@@ -257,6 +259,8 @@ PianoReturn_t PianoRequest (PianoHandle_t *ph, PianoRequest_t *req,
case 1: {
char *xmlencodedPassword = NULL;
+ req->secure = true;
+
/* username == email address does not contain &,<,>," */
if ((xmlencodedPassword =
PianoXmlEncodeString (logindata->password)) ==
View
@@ -24,6 +24,8 @@ THE SOFTWARE.
#ifndef _PIANO_H
#define _PIANO_H
+#include <stdbool.h>
+
/* this is our public API; don't expect this api to be stable as long as
* pandora does not provide a stable api
* all strings _must_ be utf-8 encoded. i won't care, but pandora does. so
@@ -152,6 +154,7 @@ typedef enum {
typedef struct PianoRequest {
PianoRequestType_t type;
+ bool secure;
void *data;
char urlPath[1024];
char *postData;
View
@@ -141,6 +141,7 @@ static WaitressReturn_t BarPianoHttpRequest (WaitressHandle_t *waith,
waith->postData = req->postData;
waith->method = WAITRESS_METHOD_POST;
waith->url.path = req->urlPath;
+ waith->url.tls = req->secure;
return WaitressFetchBuf (waith, &req->responseData);
}

0 comments on commit a288397

Please sign in to comment.