简体   繁体   English

Sinatra-Synchrony导致HttpProtocolException:HTTP标头-对于某些用户来说是预期的错误

[英]Sinatra-Synchrony is causing HttpProtocolException: HTTP-headers - are expected Error for some users

I have a webapp that updates data in Pardot through one of their API's. 我有一个webapp通过其API之一更新Pardot中的数据。

The webapp is coded with Sinatra. 该Webapp使用Sinatra编码。 The user adds the api url and a csv file with the data that needs to be updated in a form and hits submit. 用户将api网址和csv文件以及需要更新的数据添加到表单中,然后点击提交。 The code parses the csv data and sends it to the url that was provided. 该代码解析csv数据并将其发送到提供的url。 The back end server is Windows Server 2008 R2 with IIS 7.5 and HeliconZoo. 后端服务器是带有IIS 7.5和HeliconZoo的Windows Server 2008 R2。

Because of performance issues Helicon tech support pointed me to Sinatra::Synchrony and I decided to implement it. 由于性能问题,Helicon技术支持将我指向了Sinatra :: Synchrony ,因此我决定实施它。

I tested it on multiple different computers with different OS's and browsers and everything works good. 我在具有不同操作系统和浏览器的多台不同计算机上对其进行了测试,并且一切正常。 Performance was noticeably faster when more then one computer was connected and had submitted the form. 当连接一台以上的计算机并提交表单时,性能显着提高。

The problem I have is that some users keep getting this error after every time they submit the form: 我的问题是,某些用户在每次提交表单后仍会收到此错误:

Error
Helicon Zoo module has caught up an error. Please see the details below.
Worker Status
  %WorkerStatus%
Windows error
  %WindowsError% 
Internal module error
 message: HTTP-headers - are expected
 job: JobHttp[#3] - /
 transportStatus:Online
 getErrorMessage:
 RAW output bytes:0
 RAW output Begin
 Empty stderr
 End

type: ZooException
file: JobHttp.cpp 
line: 266
version: 1.1.57.268

Even though they get this error the data was sent to Pardot successfully. 即使他们收到此错误,数据也已成功发送到Pardot。

Here is an entry from the ZooError.log file: 这是ZooError.log文件中的一项:

[10/24/2012 10:44:01]   HttpProtocolException: HTTP-headers - are expected

job: JobHttp[#212]  - / 

transportStatus:Online 

getErrorMessage: 

RAW output bytes:0

RAW output Begin

Empty stderr

End

Where do I even start to troubleshoot this error? 我什至从哪里开始解决此错误?

Neil. 尼尔 I'm from Helicon Tech and will try to help you. 我来自Helicon Tech,将尽力为您提供帮助。 Please check the log of your Sinatra application, as according to our logs Sinatra responded with empty response which is not good. 请检查您的Sinatra应用程序的日志,因为根据我们的日志,Sinatra回答为空,这不是很好。

It can be some issue in Zoo, so if you could provide some test application and instructions on how to reproduce such behavior to our helpdesk , we would try to detect and fix it. 这可能是Zoo中的一个问题,因此,如果您可以向我们的服务台提供一些测试应用程序以及有关如何重现此类行为的说明,我们将尝试检测并修复它。

I want to thank Tony for offering to help but this error didn't have anything to do with Helicon Zoo. 我要感谢Tony提供的帮助,但是此错误与Helicon Zoo没有任何关系。 The errors that were displayed on the screen from Zoo weren't any help but this ended up being an issue with my own code. Zoo的屏幕上显示的错误没有任何帮助,但这最终成为我自己的代码的问题。

I was sending data to Pardot that came from a csv file. 我正在将来自csv文件的数据发送到Pardot。 The users where creating the .csv files from excel by copying from one excel sheet to the other. 通过从一个excel工作表复制到另一个工作表来从excel创建.csv文件的用户。 By doing this excel was copying a bunch of blank lines and these blank lines were then saved into the csv file. 通过执行此操作,excel将复制一堆空白行,然后将这些空白行保存到csv文件中。

So...once I checked for blank rows in the csv file: 所以...一旦我在csv文件中检查了空白行:

if !row.empty?

I stopped getting the error. 我停止收到错误消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM