Front-end submission form with the form data to the background appear Unexpected EOF read on the socket abnormality

Here Insert Picture Description
Here Insert Picture Description
front end:

register: function(){
					var formData = new FormData();
					formData.append("image", this.file);
					formData.append("name", this.bean.name);
					formData.append("account", this.bean.account);
					formData.append("password", this.bean.password);
					formData.append("email", this.bean.email);
// 					alert(this.file.name);
// 					alert(JSON.stringify(this.bean));
					var url = "register";
					axios.post(url, formData).then(function(response){
						location.href = "admin";
					});
				},

With var formData = new FormData (); packaging data and image files.
Front end to the back end by axios data, may receive a rear start normally, but can not perform a function upon receiving the distal end of the response, as upload occurs more than a few errors.

So I Baidu to find a cause, a lot of people said to be loaded Tomcat timeout, timeout to be modified to add the relevant configuration. But I should not be because of this.
But I also found a used because of the emergence of a Form form, I suddenly found form also form their own use, remove the label just fine.

to sum up:

Remove the form tag like

Published 63 original articles · won praise 1 · views 2656

Guess you like

Origin blog.csdn.net/qq_42039738/article/details/104735893