Getting corrupted response back using cpp-netlib-0.9.4 on top of boost 1.51.0 #168

Closed
rajatjain opened this Issue Nov 15, 2012 · 0 comments

2 participants

@rajatjain

The above setup is on Visual Studio 2010 on Windows 7. Very occasionally, I will get corrupted data back. The relevant code is:

void Interface::Get(const string& uri, http::client::response* response) {
Mlog("Get request: " + uri);
http::client client;
http::client::request request(host_ + uri);
make_request_header(uri, &request);
*response = client.get(request);
if (response->status() != 200) {
MyLogger::Log(" error body: " + response->body());
}
string body(response->body());
Mlog("response: " + body);
}

The usual response that I should get is:

["test_ms","orig_dest","t1","walmart_tw","tw_rel_part1","twitter_small","ttable1","english_1grams","memetracker1","wiki_stats","wiki_stats2","memetracker","ticker09","memetracker2","jobs_demo","meme01","memetracker09","qd_1","auctions3","auctions00","auctions01","auctions31","auctions02","auctions04","auctions06","time03","csv_xxx","csv_xxx_1","time_test_1","mytable1","weblogs_agg","ue_readonly","qd_x_1","orclcsv","timecsv","data1_30days","mystats","q1_wikistats","test_logs","test_logs2","qd","sshankar_test_dbsink","sshankar_avg_col0","default_qubole_memetracker","qd_csv","qd_csv_big","test","qd_json","jobs21","jobs22","sshankar_test_dbsink_1","tick_data","qd_json_30g","ss_jobs_27","ss_jobs_28","ss_29","tick_daily","daily_tick","posts","pages1","pages2","posts2","xx_qd_csv","insights07","pages07","jssarma_test_memetracker","wow002","wow03","sqoop_import_cubes","qbol456","qbol456_ext","books01","3int","weblogs_01","test3_sep7_temp_b1d62e39_5659_4aa2_84ea_d2e085dee953","test6_sep10","test7_sep10_temp_e75d5920_4dc3_4c50_ae09_82c4c6648240","test7_sep10_temp_cbebb514_6d95_4dda_b6ef_30427487cc91","test7_sep10_temp_860896ec_02bc_4e04_a4b5_4b1da340770c","test7_sep10_temp_962cdba5_3008_4b8d_9add_44652a57afb9","test7_sep10_temp_99482efe_4548_44ae_832b_994877104d6d","test7_sep10","test7_sep10_temp_75513d57_2c0c_40e0_aef8_ee16f6474a47","jssarma_sqoop_test","test_siva","test_sshankar_month_1","test_oozie2","test3sep19","qbol555_15000_1","swoop","swoop_session","jssarma_sqoop_tmp1","tmp1","miniwikistats","staging_query_hists","wiki_mini","ma_memetracker","test_30days","demo_table","staging_coord_actions_temp_6358e0d8_3f36_4221_8c70_407ebd085d4f","mongotest","adv_import_test1","miniwikistats2","staging_coord_actions"]

which is just a json string of table names.

But sometimes I get this:

394

["test_ms","orig_dest","t1","walmart_tw","tw_rel_part1","twitter_small","ttable1","english_1grams","memetracker1","wiki_stats","wiki_stats2","memetracker","ticker09","memetracker2","jobs_demo","meme01","memetracker09","qd_1","auctions3","auctions00","auctions01","auctions31","auctions02","auctions04","auctions06","time03","csv_xxx","csv_xxx_1","time_test_1","mytable1","weblogs_agg","ue_readonly","qd_x_1","orclcsv","timecsv","data1_30days","mystats","q1_wikistats","test_logs","test_logs2","qd","sshankar_test_dbsink","sshankar_avg_col0","default_qubole_memetracker","qd_csv","qd_csv_big","test","qd_json","jobs21","jobs22","sshankar_test_dbsink_1","tick_data","qd_json_30g","ss_jobs_27","ss_jobs_28","ss_29","tick_daily","daily_tick","posts","pages1","pages2","posts2","xx_qd_csv","insights07","pages07","jssarma_test_memetracker","wow002","wow03","sqoop_import_cubes","qbol456","qbol456_ext","books01","3int","w

330

eblogs_01","test3_sep7_temp_b1d62e39_5659_4aa2_84ea_d2e085dee953","test6_sep10","test7_sep10_temp_e75d5920_4dc3_4c50_ae09_82c4c6648240","test7_sep10_temp_cbebb514_6d95_4dda_b6ef_30427487cc91","test7_sep10_temp_860896ec_02bc_4e04_a4b5_4b1da340770c","test7_sep10_temp_962cdba5_3008_4b8d_9add_44652a57afb9","test7_sep10_temp_99482efe_4548_44ae_832b_994877104d6d","test7_sep10","test7_sep10_temp_75513d57_2c0c_40e0_aef8_ee16f6474a47","jssarma_sqoop_test","test_siva","test_sshankar_month_1","test_oozie2","test3sep19","qbol555_15000_1","swoop","swoop_session","jssarma_sqoop_tmp1","tmp1","miniwikistats","staging_query_hists","wiki_mini","ma_memetracker","test_30days","demo_table","staging_coord_actions_temp_6358e0d8_3f36_4221_8c70_407ebd085d4f","mongotest","adv_import_test1","miniwikistats2","staging_coord_actions"]

0

Any ideas why this happens? I have confirmed from the server side that it is not an issue on their side by checking the logs.

@deanberris deanberris pushed a commit that referenced this issue Feb 25, 2013
@skystrife skystrife Fix issues #110 and #168. bd90c39
@deanberris deanberris pushed a commit that referenced this issue Feb 28, 2013
@skystrife skystrife Fix issue #110 and issue #168. c6c1607
@deanberris deanberris closed this Jul 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment